Hi
I’m trying to perform a cfa of a psychological battery that has 37 items, for which prior cfa suggest has an 11 factor structure; each of the 37 items is rated on a 7-point Likert scale.
When this psychological battery was first published, cfa showed it had barely adequate fit measures, and subsequently the authors suggested that four pairs of items should have their error covariances freed to improve fit.
I thought I would free these covariances by adding terms like x1 ~~ x2 to the model, because the modification indices in my data suggested that these same four pairs of residual covariances should be freed. However I was nervous about doing this because one of the four pairs of residual covariances was for items that were supposed to load onto different latent variables.
This model that had the four free residual covariances freed had a better fit than the model that didn’t free them when I fit it to the entire sample. But when I tested the measurement invariance in ethnic groups, I ran into problems, and I would like to ask your advice. What I would like to ask is: do I have to state in the cfa() that the items are ordered if I am going to use estimator=”WLSMV” ?
Because I misunderstood the code stating ordered=c(item1, item2, . .. . ), I didn’t include it when I started, and it seemed to work well, giving me no warnings. However, I now realise that I should declare to lavaan that the data are ordinal, so I added it and removed the term estimator=”WLSMV”, but this gave me the warning: “lavaan WARNING: covariance matrix of latent variables is not positive definite; use inspect(fit,"cov.lv") to investigate.”
When I inspected the covariance of latent variables, all were positive, but when I looked at the eigenvalues the last one was negative: 2.9701287206 0.8247727438 0.8082874014 0.4886781682 0.4381578907 0.3166371107 0.2648484386 0.1378354428 0.0781594220 0.0691967668 -0.0004707457
The eigenvalues were all positive when I didn’t include the ordered statement in the cfa():[1] 9.5142774 3.3008226 2.7263258 2.0661703 1.6764486 1.2925841 0.8536194 0.5164931 0.2943799 0.1629691 0.0453801
Is it vital to tell Lavaan that the items are ordinal before using the estimator WLSMV?
I think the cause of my problem is the freeing of the residual covariances of the four pairs of items, because in the model that does not free them, I get no warnings when I fit it with the statement that the items are ordered in the cfa() code, and the eigenvalues are all positive [1] 3.00074635 0.86855023 0.82474092 0.49010797 0.43912718 0.31956604 0.27525692 0.22408847 0.10381235 0.07781825 0.02671555
What do you think? Can I use estimator=”WLSMV” without
specifying the data are ordinal, or does the fact that lavaan gives me a
warning message and the last eigenvalue is negative, suggest that it was wrong
to free the residual errors of the four pairs of items? Could the reason I am having problems when I look at the fit in subsamples simply be because the size of the subsamples is too small to account for the amount of covariance?
Thank you so much for your help.
Best wishes
Brent