HELP WITH LAVAAN ERROR. Error with path analysis using latent variable

Skip to first unread message

Lindy Howe

Jan 2, 2020, 2:07:53 PM1/2/20
to lavaan
Hi all  - I am completing a mediation analysis using lavaan. The analysis has 2 causal factors (TAI and mBDI), 1 mediator (BPD), and 1 DV (SUD) which is a latent variable. 

I am attempting to run this model using lavaan, but am getting an error when fitting that I cant fix!! Any help? Syntax below. 

> model <- '  SUD.sum =~ Alc.Sum+Drug.Sum+MJ.Sum    
+             BPD.Sum ~ TAI.SUM + mBDIII.SUM
+             SUD.sum ~ BPD.Sum + TAI.SUM + mBDIII.SUM
+             mBDIII.SUM ~~ mBDIII.SUM
+             TAI.SUM ~~ TAI.SUM
+             mBDIII.SUM ~~ TAI.SUM
+             BPD.Sum ~~ BPD.Sum
+             SUD.sum ~~ SUD.sum'
> fit <- lavaan(model, estimator = 'MLF', data=df)
Error in lav_model_estimate(lavmodel = lavmodel, lavpartable = lavpartable,  : 
  lavaan ERROR: initial model-implied matrix (Sigma) is not positive definite;
  check your model and/or starting parameters.

Note: The error goes away when I remove the latent variable, but I need the latent variable to be included. 


Terrence Jorgensen

Jan 3, 2020, 11:16:43 AM1/3/20
to lavaan
I am attempting to run this model using lavaan

Try using sem() instead, which automatically adds the residual-variance estimates you have omitted from your syntax (the cause of your error).

I hope your N is large enough for MLF.  First-order information does not perform well with modest sample sizes.

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

Reply all
Reply to author
0 new messages