Hi
I'm trying to do a CFA on a dataset with ordinal variables (response categories 1-4) and as I understand WLSMV is a better estimator to use when dealing with this kind of data.
However, I'm wondering what the correct syntax would be.
From the lavaan tutorial it seems like you can write ordered=TRUE to specify that all variables are to be treated as categorical, and by doing so lavaan automatically switches to the WLSMV estimator. Giving me the following syntax
fit1. <- cfa(myModel, data = mydata, ordered=TRUE)
But it seems like you can also write the syntax where you sepcify which estimator you want it to use, like this:
fit2. <- cfa(myModel, data=mydata, estimator ="WLSMV")
I would then think these two would give me the same results, but they don't... Why? And what is the correct way to get the program to use the WLSMV estimator for the factor analysis?
Would it be correct to write it like this:
fit <- cfa(MyModel, data=mydata, estimator="WLSMV", ordered=TRUE)
Many thanks,
Jonil