Dealing with negative variance in CFA using lavaan: How to identify and resolve the issue?

I’m working on a confirmatory factor analysis (CFA) using lavaan in R. My model has 8 first-order factors and 1 second-order factor. When I run the analysis, I get a warning about some estimated observed variances being negative. Here’s a simplified version of my model:

model <- '
  Factor1 =~ Item1 + Item2 + Item3
  Factor2 =~ Item4 + Item5 + Item6
  Factor3 =~ Item7 + Item8 + Item9
  SecondOrder =~ Factor1 + Factor2 + Factor3
'

fit <- cfa(model, data=myData, estimator='MLR', missing='FIML')
summary(fit, fit.measures=TRUE, standardized=TRUE)

My sample size is pretty small (n=78) and I’m using MLR estimation because the data isn’t normally distributed. I’m not sure how to find out which variance is negative or how to fix this problem. Any ideas on how to troubleshoot this issue? I’d really appreciate some guidance on what steps to take next. Thanks!

Negative variance in CFA can be tricky, especially with a small sample size and complex model structure. To identify the problem, use lavInspect(fit, ‘est’)$theta to check which variances are negative. Given your sample size (n=78) and model complexity (8 first-order factors, 1 second-order), you might be overextending your data. Consider simplifying your model initially - perhaps start with just the first-order factors and gradually build complexity. Also, review your item selection for each factor; highly similar items can sometimes cause issues. If problems persist, you might need to collect more data or consult with a statistician experienced in CFA for more tailored advice. Remember, model respecification should always be guided by theory, not just statistical results.

Hey there, Nate_45Guitar! :guitar:

Negative variance in CFA can be a real head-scratcher, especially with a small sample size like yours. I’ve run into similar issues before, and it can be frustrating!

Have you tried checking which specific variances are negative? You could use the lavInspect() function to get a closer look:

lavInspect(fit, 'est')$theta

This might help pinpoint where the problem is. Sometimes, it’s just one or two items causing trouble.

Also, with only 78 participants and a complex model (8 first-order factors and 1 second-order), you might be asking a lot from your data. Have you considered simplifying your model a bit? Maybe start with just the first-order factors and see if that helps?

Another thing - how did you choose your items for each factor? Sometimes, if items are too similar, it can lead to these kinds of issues. Might be worth revisiting your item selection if possible.

What do you think about these ideas? Have you tried any of them already? I’m really curious to hear more about your project and what you’ve tried so far!

yo nate, negative variance is a pain! try this:

lavInspect(fit, ‘est’)$theta

it’ll show u which items are causing trouble. ur sample size is tiny for such a complex model tho. maybe simplify it? start with just first-order factors n see what happens.

lmk if u need more help bro!