# MIMIC model : Expected covariance matrix is non-positive-definite.

6 posts / 0 new
Offline
Joined: 07/31/2009 - 14:25
MIMIC model : Expected covariance matrix is non-positive-definite.

Hi all,

Any clues on getting this mimic model working? I've explored a range of start-vals... always getting NonPosDef
omx seems not to like models with formative structures (i've got it going with the formative measures having residual variance, rather than being correlated)

Example is from chapter 13 Schumacker and Lomax Beginner's guide to SEM

data <- data.frame(matrix(c(
1.000, 0.304, 0.305, 0.100, 0.284, 0.176,
0.304, 1.000, 0.344, 0.156, 0.192, 0.136,
0.305, 0.344, 1.000, 0.158, 0.324, 0.226,
0.100, 0.156, 0.158, 1.000, 0.360, 0.210,
0.284, 0.192, 0.324, 0.360, 1.000, 0.265,
0.176, 0.136, 0.226, 0.210, 0.265, 1.000
),nrow=6))

manifests = c("income", "occup", "educ", "church", "member", "friends")
dimnames(data) = list(manifests, manifests)

latents   = "social" # 1 latent, with three formative inputs, and three reflective outputs (each with residuals)
receivers = manifests[4:6]
sources   = manifests[1:3]

MIMIC <- mxModel("MIMIC", type="RAM",
manifestVars = manifests,
latentVars   = latents,
# Factor loadings
mxPath(from = sources , to = "social" , values = c(.23, .11, .3) ),
mxPath(from = "social", to = receivers, values = c(.47, .74,.4) ),
# Correlated sources
mxPath(from = sources, connect = "unique.bivariate", arrows = 2, values = c(.3,.2,.3) ),
# Residual variance on receivers
mxPath(from = receivers, arrows = 2, values = c(.32,.31,.28) ),
mxData(data, type = "cov", numObs = 530)
)
MIMIC= mxRun(MIMIC); summary(MIMIC)

Error: The job for model 'MIMIC' exited abnormally with the error message: Expected covariance matrix is non-positive-definite.
Offline
Joined: 07/31/2009 - 15:24
Uh, what is mxStart?

Uh, what is mxStart?

Offline
Joined: 02/04/2010 - 20:45
data definition

Shouldn't the data definition read something like this:

data <- data.frame(matrix(c(
1.000, 0.304, 0.305, 0.100, 0.284, 0.176,
0.304, 1.000, 0.344, 0.156, 0.192, 0.136,
0.305, 0.344, 1.000, 0.158, 0.324, 0.226,
0.100, 0.156, 0.158, 1.000, 0.360, 0.210,
0.284, 0.192, 0.324, 0.360, 1.000, 0.265,
0.176, 0.136, 0.226, 0.210, 0.265, 1.000
),nrow=6))
Offline
Joined: 07/31/2009 - 14:25
Thanks Andreas!

Thanks Andreas!
To help others, I put up a wiki page with a working version and a path diagram!

http://openmx.psyc.virginia.edu/wiki/example-models

Offline
Joined: 02/04/2010 - 20:45
Great! I am sure that'll be

Great! I am sure that'll be very helpful to other users.

Offline
Joined: 02/04/2010 - 20:45
Add latent variance

Your model has no source of variance on the latent level because neither social nor any of the formative structures have unique variance, only covariance. The covariance between the latent non-varying structures is neither adding any variance.
On p. 299 of the beginner's guide to SEM, a correlation matrix is fed to the model. In this case, I reckon you should add fixed unit variances to your formative factors income, occup, and educ, and it should run fine.

Log in or register to post comments