lavaan WARNING: covariance matrix of latent variables is not positive definite

322 views
Skip to first unread message

Amonet

unread,
Mar 21, 2018, 6:32:46 AM3/21/18
to lavaan
Hi,

I am conducting a longitudinal CFA. I am evaluating measurement invariance and when I restrict the factor loadings to be equal across time with estimator =  'MLM' (i.e. all missing values also deleted), I get the warning message that LV cov matrix is NPD. 

Following advice from Terrence Jorgensen here: https://groups.google.com/forum/#!topic/lavaan/V4ikmv6wGHE 
I checked for the CI of the correlations of my Latent Variables. What I did was:

fit2 <- cfa(model = Model2, data = data, estimator = 'mlm', std.lv = TRUE)
summary(fit2, ci = TRUE, standardized = TRUE)

I indeed get some upper bounds that exceed 1. 

Question 1: is it these upper bounds that exceed 1 why I get the warning? The largest upper bound is 1.023. 
Question 2: in the configural model (without factor loadings fixed), I don't get this warning message. However, when I compute the CIs in the same way, I get e.g.: LV0 ~~ LV1 [0.921 ; 1.016]. Why doesn't it give me a warning here? 
Question3: as soon as 1 CI upper bound of these LV correlations exceed 1, does that mean I should do something about my model? In other words, is the result of the model potentially wrong or unreliable? 
Question4: Somewhat off topic here, but related to measurement invariance. I never see people checking if the residual correlations are still good when they proceed from one level to another when evaluating MI, should you only check e.g. the change in AIC, RMSEA, chi-square test, ... (i.e. overall GoF)? 

Thanks in advance. 

Amonet

unread,
Mar 21, 2018, 7:54:15 AM3/21/18
to lavaan
I thought it might be informative to also report my sample size. For the complete case analysis, 89 observations for each time point (4 time points total). 
I would think that if my sample size was a lot bigger, for example 1000 observations, my SE would get smaller and then it might be able to distinguish a point estimate of e.g. 0.96 (corrrelation) from 1. So that is in answer to my own Question(3). Although I think a misspecified model could still be the reason. 

Terrence Jorgensen

unread,
Mar 27, 2018, 6:20:19 AM3/27/18
to lavaan
I indeed get some upper bounds that exceed 1. 

If your point estimate already exceeds 1, then of course your upper confidence limit will exceed 1.  The relevant issue is whether your entire confidence interval includes plausible values.  Is your lower bound below 1?

Question 1: is it these upper bounds that exceed 1 why I get the warning? The largest upper bound is 1.023. 

No, the warning is only issued when the point estimates yield a NPD matrix (whether that is due to a Heywood case like yours or not).

Question 2: in the configural model (without factor loadings fixed), I don't get this warning message. However, when I compute the CIs in the same way, I get e.g.: LV0 ~~ LV1 [0.921 ; 1.016]. Why doesn't it give me a warning here? 

Because the point estimates imply a positive-definite matrix.

Question3: as soon as 1 CI upper bound of these LV correlations exceed 1, does that mean I should do something about my model? In other words, is the result of the model potentially wrong or unreliable? 

Not if it is consistent with sampling error.  But pay attention to model fit as well.  Gross model misspecification can cause this issue, but in my experience, that misspecification has to be pretty severe to cause Heywood cases, whereas Heywood cases are quite common in small samples like yours.

Question4: Somewhat off topic here, but related to measurement invariance. I never see people checking if the residual correlations are still good when they proceed from one level to another when evaluating MI, should you only check e.g. the change in AIC, RMSEA, chi-square test, ... (i.e. overall GoF)? 

I think I answered your question on SEMNET already :-)

Terrence D. Jorgensen
Postdoctoral Researcher, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Amonet

unread,
Mar 27, 2018, 4:26:33 PM3/27/18
to lavaan

I think I answered your question on SEMNET already :-)


Yes you did, thanks again for that! Really glad to have experts like you around who are willing to help out. It's a hard topic to learn from scratch :) 

Best wishes

Reply all
Reply to author
Forward
0 new messages