Hi,
I try to performance a linear regresión with error-in-variables to estimate the error latent variable.
y ~ b0+b1X+e
where,
X= x*+u
u is a variable no measure for uncertainity. How can i run this model in lavaan?
I tried this,
mod <- 'y~x
u=~x'
sem(model = mod,data = data,estimator="MLR",meanstructure=T, control=list(rel.tol=1e-15,iter.max=1000,eval.max=10000)))
But i get this warning
lavaan WARNING:
The variance-covariance matrix of the estimated parameters (vcov)
does not appear to be positive definite! The smallest eigenvalue
(= -7.377068e-02) is smaller than zero. This may be a symptom that
the model is not identified.
Could you help me with this issue?
Thank you.