Re: Bug with warning messages?

52 views
Skip to first unread message
Message has been deleted

Terrence Jorgensen

unread,
Jan 29, 2019, 8:28:10 AM1/29/19
to lavaan
As a way to get rid of the negative variance issue, I thought of using bootstrapping...

How would that help?  It doesn't change your original data or estimates...

The interesting part is that after launching the model estimation using bootstrapping, all subsequent warning messages disappear

Are you sure there are just so many warnings building up that R begins suppressing them, giving you the option to print them afterward using the warnings() function?  Try that.

I believe this is due to the parameter highlighted in red below (cor>1). Am I right?

Yes, that is called a Heywood case (theoretically out-of-bounds estimate, like a negative variance), which could be caused by gross model misspecification or simply by sampling error if the population value is close to a theoretical boundary (i.e., if your X and Y trajectories are actually quite correlated).  Since your model does not seem grossly misspecified, I would recommend using the bootstrapLavaan() function to obtain a 95% CI around that standardized value.  If your CI includes plausible values (i.e., correlations < 1), then you can't reject the H0 that sampling error is the cause.  In which case there is no problem to fix, just interpret the interval estimate instead of the point estimate.


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

Message has been deleted

Terrence Jorgensen

unread,
Jan 30, 2019, 4:54:49 AM1/30/19
to lavaan
It's possible that lavaan internally sets warn=FALSE when bootstrapping so that 1000 copies of the same message don't build up.  I would be surprised if he didn't turn warn=TRUE back on at the end of bootstrapping, but perhaps it does not get turned back on if you interrupt the process before it finishes.

?lavOptions

Reply all
Reply to author
Forward
0 new messages