Published on *OpenMx* (http://openmx.psyc.virginia.edu)

By *JoopDirksen*

Created *06/28/2011 - 09:55*

Tue, 06/28/2011 - 09:55 — JoopDirksen [1]

Hello,

I'm developing a model, but I run into a couple of problems. Since the OpenMx documentation did not give the answer I was looking for, I want to try it here. I'm having a hard time getting started with SEM and with OpenMx because there is no real good overview of SEM methodology in my opinion.

I'm trying to run the following code:

library(OpenMx)

model <- mxModel(

name="Model",

type="RAM",

manifestVars = c("A", "B", "C", "D", "E","F"),

latentVars = c("var1", "var2", "var3", "var4"),

mxPath(from="var1",to=c("A", "B", "C")),

mxPath(from="var2",to=c("B", "D", "E")),

mxPath(from="var3",to=c("F", "E")),

mxPath(from="var4",to=c("C", "D")),

mxPath(from="one",to=c("A", "B", "C", "D", "E","F", "var1", "var2", "var3", "var4")),

mxData(observed=data,type="raw")

)

fit <- mxRun(model)

summary(fit)

I'm getting the error message "Expected covariance matrix is not positive-definite in data row 126 at iteration 0"

Can anybody tell me what this error message means? I read on the errors page that it means that you should change your "starting values", but where should I do that? And besides that, what are "starting values" anyway? Somewhere it also mentions "free variables", but I cannot find a clear explanation what a "free variable" is exactly.

Who can give me the exact code I need to add to modify these starting values? I also read somewhere that it has to do with matrices for which no inverse can be calculated and that a Cholesky decomposition could help. Is anybody familiar with this method? And if so, what exactly do I need to change in the code above to make this work?

Thanks,

Steven

**Links:**

[1] http://openmx.psyc.virginia.edu/users/joopdirksen

[2] http://openmx.psyc.virginia.edu/thread/998

[3] http://openmx.psyc.virginia.edu/thread/958

[4] http://openmx.psyc.virginia.edu/forums/openmx-help/openmx-error-messages