Latent change scores model - variance-covariance matrix not positive defined

79 views
Skip to first unread message

Tatiana Marci

unread,
Feb 5, 2025, 8:19:45 AM2/5/25
to lavaan
Dear all,

I am estimating a latent change score model and encountered an issue when including sex as a covariate at the baseline level of my variables. I get the following error:

"The variance-covariance matrix of the estimated parameters (vcov) does not appear to be positive definite! The smallest eigenvalue (= 2.704064e-20) is close to zero. This may indicate that the model is not identified."

However, when I remove sex as a covariate, the model fits well (attached the output). Subsequently, I conducted a multi-group analysis (MG) and found that the latent change score models for boys and girls performed well separately. Based on these findings, can I hypothesize that sex might act better as a moderator rather than a control variable? Do you have any suggestion?

Thanks a lot
LCSM.html

Yves Rosseel

unread,
Feb 5, 2025, 9:19:23 AM2/5/25
to lav...@googlegroups.com
On 2/5/25 2:18 PM, Tatiana Marci wrote:
> I am estimating a latent change score model and encountered an issue
> when including sex as a covariate

If sex is binary (say 0/1), and you treat it as a random variable,
lavaan will try to estimate both the mean and the variance. But they are
linked, so one of them is redundant.

One possibility would be to impose a constraint like this:

sex ~ p*1 # mean
sex ~~ q*sex # variance

q == p * (p - 1) # constraint

Alternatively, if sex is exogenous in the model, you can use fixed.x =
TRUE (which is the default).

Yves.
Reply all
Reply to author
Forward
0 new messages