R (lavaan): How to compare CFA models estimated with DWLS (alias WLSMV)

2.5k Views Asked by At

How can I compare two CFA models estimated with DWLS / WLSMV?

To find out which CFA model fits best for my data, I used the DWLS estimator for ordinal data in lavaan and specified two models:

  • 4-factor-model, i.e. model.ordinalX
  • 2-factor-model, i.e. model.ordinalY

Code:

model.ordinalX = cfa(model.4, data=Data, ordered=c(
"AVf1","AVf2","AVf3","AVf4","AWf1","AWf2","AWf3","AWf4","ABf1","ABf2","ABf3","AAf4","AAf1","AAf2","AAf3","AAf4"))

summary(model.ordinalX, fit=T) 

Subsequently, I specified the 2-factor-model. When comparing those two, lavaan returns an error.

Code:

anova(model.ordinalX, model.ordinalY)

The warning message is:

Error in lav_test_diff_af_h1(m1 = m1, m0 = m0) : lavaan ERROR: unconstrained parameter set is not the same in m0 and m1.

(Please note: If I use normal Maximum Likelihood I can compare the models.)

I've noticed that there is a difference in the outputs. With Maximum Likelihood estimation there are AIC and BIC values in the outputs, which are missing in the DWLS-outputs. These seem to be relevant for the comparison since the output of the comparison of the Maximum-Likelihood models contains those values.

0

There are 0 best solutions below