This forum is designed for discussions about how to create and fit SEM models with OpenMx. This forum is designed to be about the nuts and bolts of how to use OpenMx rather than a general purpose SEM modeling forum. For questions about the models themselves, rather than how to implement them in OpenMx, please see the OpenSEM forums where models are split by many different types.

Hi All,

I am wondering if it is possible to place constraints on lambda loadings (i.e., constraining the loadings of a two indicator construct to be equal, or constraining the average of a construct's loadings to equal 1 to set the scale by the effects coding method). I've been working primarily with the path specification approach, and I can't see an obvious way that this could be implemented, nor can I find any mention or suggestions in the documentation. Would this be something more easily achieved under the matrix specification approach? Any insight would be greatly appreciated.

Constraining free parameters to be equal to one another is easy: just set their labels to be the same. For instance, starting with the script on the front page of the website, we could constrain two of the loadings to be the same by giving them both the label "lambda1".

Esteemed developers -

Forgive the novice question. In the course of trying to learn OpenMx I have been adapting working code to fit new models and new data. Below is a model for what ought to be a simple saturated path model with 5 variables:

helpful -> politics, people, perform, jobsat

politics -> jobsat

people -> jobsat

perform -> jobsat

...with covarying residuals for politics, people, and perform, and therefore 20 parameters (7 paths, 5 variances, 3 covariances, 1 mean, 4 intercepts). I tried specifying a LISREL-type model with each MV serving as a perfect indicator of its corresponding LV (Fhelpful, etc.) and regressing the LVs on each other. OpenMx returns a "non-positive definite" error. I think I am specifying the model incorrectly, but cannot figure out how.

The error codes:

Output also claims only 13 parameters are estimated rather than 20.

Many thanks,

Kris

It looks like when specifying the paths under the line "# latent variances and covariances", you are expecting to specify 25 paths. Use the parameter all = TRUE to specify 5 x 5 paths. The default value for the 'all' parameter is FALSE, which makes 5 paths given 5 entries in the 'from' argument. Only if 'all' equals TRUE, then all sources are connected to all sinks.

Thanks! This gets me the proper number of parameters, but still bad output:

and now:

or:

the only other modification I made to the code above was to add "labels=as.character()" to the final mxPath statement, but that isn't the source of this problem.

might help to debug this by laying out the code into smaller chunks

just dashed this off, but i think it reflects the tasks you want

Thanks Tim. I made the code as bare-bones as possible, ran it, and still I do not receive the expected output. Does it matter that the model is just-identified?

It could be your starting values. You've built a set of starting values of all 1s, which should build an expected covariance that is exactly singular. At the first iteration, OpenMx can't invert the expected covariance matrix, and crashes.

Try changing your starting values (say, by making all of the covariances and free regressions .5) and see if it runs.

That did the trick! Thanks Ryne.