Skip to content
Prev 303071 / 398506 Next

Lavaan: Immediate non-positive definite matrix

Dear Andrew,

Maximum likelihood estimation with missing data typically makes some
rather strong assumptions.  If I am not mistaken, the default
covariance coverage in Mplus is .05, the fact that you need to set it
lower suggests you have some combinations of variables with less than
5% jointly present?

If that is true, I am not surprised you are getting errors.
Estimation is an iterative process utilizing the expectation
maximization algorithm with the E step finding the expected value
given the available data and then maximizing the parameters based on
that, which becomes the basis for another E step and so on.  In the
case of no missing data, the expectations do not need to be updated at
all (easy) in the case of a lot of missing data, more steps are
required.  With < 5% (if the assumptions that conclusion was
predicated on are indeed true) pairwise present data for some
combinations, estimates could be quite instable.

If you are dealing with a typical longitudinal study, drop out
probably increases with each additional time point.  The easiest case
is where dropout is monotonic, in which case perhaps it still makes
sense to try to include all time points.  If the missingness is not
monotonic and the < 5% is with some combination of the final time
point, I would suggest you simply look at an unconditional growth
model of say the first 5 or 6 time points.

Actually, even if you keep all 7, if there is increasing missingness
at later time points, I would suggest that you try just 5 and 6 times
as a sort of sensitivity analysis to see how your results are
effected.

I realize that none of my comments really directly pertain to R so
this email is rather off topic for R help.  Here is my saving bit ;)
For data, try sharing it by uploading to some website such as google
drive, dropbox, skydrive, etc. and then just sharing a link with your
emails.  Also, while you're at that, perhaps include the R script to
read data in and load lavaan etc.
sample covariance matrix is not positive definite and not invertible
(well, I am assuming that S standards for the sample covariance
matrix).

Can you try fitting the model with listwise deletion and with direct
ML?  Have you look at the (listwise) present sample covariance matrix?
 Finally, you could try fitting the model in OpenMx, which also runs
in R.

Cheers,

Josh
On Fri, Aug 10, 2012 at 12:27 PM, Andrew Miles <rstuff.miles at gmail.com> wrote: