Covariance Matrix is Not Positive Definite

2,176 views
Skip to first unread message

Christopher Wiese

unread,
Mar 3, 2017, 12:26:56 PM3/3/17
to lavaan
In preparation for running a MG-CFA between different countries, I'm running individual CFAs (using laavan in R) for each country. One measure I'm testing has 18 factors (3 items per factor) - For some countries, it works fine - others I get the

    Warning message:
    In lav_object_post_check(lavobject) :
    lavaan WARNING: covariance matrix of latent variables
                is not positive definite;
                use inspect(fit,"cov.lv") to investigate.

error message. 

I believe the issue has to do with the stronger relationships between the 18 components, but none of the correlations are above 1. Specifically, when I run 

    inspect(FIT.Model, "cor.lv")

the highest correlation is .866. However when I run

    eigen(inspect(FIT.Model, "cor.lv"))$values

the last value is negative
    
     [1] 10.20010867  1.54559353  1.05465161  0.97859508  0.67929777  0.62547121  0.53274332  0.47981312  0.42232591
    [10]  0.35644748  0.27269731  0.22664740  0.17313899  0.13122676  0.12674976  0.12398684  0.08523215 -0.01472690

same deal with I do the covariance

    [1]   5.093690855  0.865352403  0.608291153  0.536724049  0.378224007  0.328027862  0.237312742  0.221256124
    [9]   0.200210259  0.174495185  0.128960034  0.092930433  0.086906284  0.068657765  0.061912550  0.042895790 
    [17]  0.039590985 -0.001415731
    
Now, I've read places where some negative Eigenvalues are acceptable and just to continue, but I don't think mine fall into this range. 

I'm not sure why the negative Eigenvalues are there if the correlations/covariance aren't indicative of something being wrong... Why is that? And what are potential ways forward?

Thanks for the help!

Terrence Jorgensen

unread,
Mar 6, 2017, 5:07:28 AM3/6/17
to lavaan
I'm not sure why the negative Eigenvalues are there if the correlations/covariance aren't indicative of something being wrong... Why is that? And what are potential ways forward?

NPD means there is linear dependency in the matrix, so one row is a linear combination of the other rows.  The ways to check whether a matrix is NPD are negative eigenvalues or a negative determinant.  If you have a symmetric matrix with a negative (or zero, i.e., non-positive) value on the diagonal or a standardized off-diagnonal (i, j) element that exceeds +/-1, then you must have linear dependency.  A Heywood case is a sufficient condition for identifying NPD, not a necessary one (true multicollinearity indicates NPD, such as using a scale total as well as all individual scale items, any one of which is redundant with the remaining variables).

Sometimes, as you add constraints, the sampling variability gets less severe and the estimates based on common parameters might not lead to NPD.  Since this is not lavaan specific, you could find more advice on SEMNET:


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

Christopher Wiese

unread,
Mar 6, 2017, 9:54:17 AM3/6/17
to lav...@googlegroups.com
Thanks for the reply Terrence. 

I reached out to SEMNET at relatively the same time as I posted this message! Such a great resource.

I believe you've answered my question. When I ran the inspect(Fit.Model, "cov.lv") I didn't see any diagonal that was 0, nor any off-diagnonals that exceeded +/-1, so I wasn't sure why I was getting the NPD. I was reading into the lavaan google group and saw a message that suggested an additional test would be to run the eigen(inspect(Fit.Model, "cov.lv")) command. That produced the negative eigenvalue. I came across this site and given the number of factors that I have (and their general similarity) I believe that the problem is it's a multivariate dependency "where several variables together perfectly predict another variable, may not be visually obvious."

Applied to my data, I believe this is suggesting that the group is not discriminating between the 18 factors well, so I'll need to adjust the model specification. Thanks for the help!

--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/X-RXaffvOLw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+unsubscribe@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.



--
Christopher William Wiese, Ph.D.
Purdue University
Reply all
Reply to author
Forward
0 new messages