standardized residuals with wlsmv estimator

196 views
Skip to first unread message

geor...@hawaii.edu

unread,
Nov 12, 2018, 3:55:53 PM11/12/18
to lavaan
I am fitting categorical data described in Chapter 13 of Kline (2016). I cannot reproduce the standardized residual matrix Kline reported with Mplus. Is this not available in lavaan yet, or am I missing something?

catdat[,c("x1", "x2", "x3", "x4", "x5")]<-  lapply(catdat[,c("x1", "x2", "x3", "x4", "x5")],  ordered)

mod<- 'Conflict =~ x1 + x2 + x3 + x4 + x5'

fit<- cfa(mod, catdat, ordered=all,
          parameterization="delta",
          estimator="WLSMV",
          mimic="Mplus")
summary(fit, fit.measures=TRUE, standardized=TRUE, rsquare=TRUE)
residuals(fit)
residuals(fit, type="standardized")

This final line gives this error:
Error in lav_model_h1_information_firstorder(lavmodel = lavmodel, lavsamplestats = lavsamplestats,  : 
  lavaan ERROR: information = "first.order" not available for estimator ‘DWLS’


Terrence Jorgensen

unread,
Nov 22, 2018, 8:41:20 AM11/22/18
to lavaan

residuals(fit, type="standardized")

These are not the correlation residuals that Kline probably reported, which are the basis for the SRMR. The option above standardizes covariance residuals by dividing by their SEs, so they are Wald z statistics. Correlation residuals can be requested with type = "cor". See the class?lavaan help page for descriptions.

Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam
http://www.uva.nl/profile/t.d.jorgensen

GeorgeHa

unread,
Nov 27, 2018, 6:14:07 PM11/27/18
to lavaan
Thank you, Terrence, for that clarification. I see that when we use WLSMV, the observed and model-implied covariances are actually correlations, giving the same result as resid(fit, type="cor"). I also see that WLSMV does not estimate the SEs that otherwise would be available with ML type estimation for estimating the standardized residuals. 

Terrence Jorgensen

unread,
Nov 29, 2018, 5:29:28 AM11/29/18
to lavaan
I see that when we use WLSMV, the observed and model-implied covariances are actually correlations

Yes, with categorical indicators, the model is fit to their estimated polychoric correlation matrix (which is treated as the "observed" covariance matrix that the model tries to reproduce).
Reply all
Reply to author
Forward
0 new messages