Error-in-Variables in lavaan

225 views
Skip to first unread message

Cristian Santa

unread,
Mar 12, 2019, 10:01:51 AM3/12/19
to lavaan
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.

Terrence Jorgensen

unread,
Mar 21, 2019, 5:43:26 AM3/21/19
to lavaan
How can i run this model in lavaan?

Use x* as the predictor, not x.  x* is the latent variable you should define (the residual "u" will be defined automatically, like "e" is for y.  To incorporate the error of x, you must fix its residual variance to the amount that is unreliable.  For example, if its reliability is 0.8, then 0.2 is unreliability.  Without knowing your total variance ahead of time, you can use labels to define a constraint such that the variance of x* and of the residual x (i.e., u) have the same ratio as 0.8 / 0.2.

mod <- '
xstar =~ 1*x
x ~~ u*x          
# label residual variance "u"
xstar ~~ rel*xstar # label reliable variance "rel"

y ~ xstar

## model constraint: rel / u == 0.8 / 0.2
rel == u * (0.8 / 0.2)
'


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

Reply all
Reply to author
Forward
0 new messages