Converting to and from OpenMx

lavaan multi-level SEM in OpenMX
I'm trying to replicate this example two-level SEM from lavaan in OpenMx http://lavaan.ugent.be/tutorial/multilevel.html
Lavaan's log-likelihood is -23309.87 but with the following OpenMx code I get only -26495.56. I have also tried to use the estimated parameters from lavaan as fixed parameters in the OpenMx model - the log-likelihood gets even worse then. I assume that the model structure in OpenMx is not the same as the structure model in lavaan.
- Read more about lavaan multi-level SEM in OpenMX
- 11 comments
- Log in or register to post comments

One standardized value does not match Mplus/lavaan
Hello fellow OpenMx-ers

Converting ClassicMx script to OpenMx
Hello,
I am currently trying to recreate ClassicMx script for an ECOT model into OpenMx and I am coming across an error that I am not sure how to solve.
When I run the model I get the following error:
Error: The following error occurred while evaluating the subexpression 'solve(ecot.matF %*% solve(ecot.matI - ecot.matA) %*% ecot.matM %*% ecot.matU)' during the evaluation of 'MZtoss.expMeanMZtoss' in model 'modelECOT' : 'a' (4 x 1) must be square
I have attached the ClassicMX code and OpenMx code.
- Read more about Converting ClassicMx script to OpenMx
- 1 comment
- Log in or register to post comments

convert lavaan to OpenMx
It will often be easiest to simply recreate your model in OpenMx or to use umx’s umxRAM function. This will also lead to to nicer code, taking advantage of OpenMx’s features.
For automated translation of lavaan syntax into OpenMx, metaSEM provides the lavaan2RAM function.
- Read more about convert lavaan to OpenMx
- Log in or register to post comments

Q
Q
- Read more about Q
- 6 comments
- Log in or register to post comments

Converting a Stata -sem- path model
Hi all
I am trying to convert a simple path model from Stata. In Stata I use
clear all
ssd init EE DR RO SE
ssd set observations 321
ssd set sd 15.23 10.15 16.27 1.01
ssd set correlations ///
1 \ ///
0.25 1 \ ///
0.78 0.21 1 \ ///
-0.47 -0.27 -0.35 1
sem (SE -> EE) (EE -> DR) (EE -> RO) (DR -> RO), nocapslatent
This generates the following output
------------------------------------------------------------------------------
| OIM
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
- Read more about Converting a Stata -sem- path model
- 3 comments
- Log in or register to post comments

THard=-n
I have had good experience with the Mx option THard=-n in Mx, also called Automatic Cold Restart. Is this option still available in OpenMx and, if not, why is it taken out?
Thanks for any answer in advance,
Han Oud
- Read more about THard=-n
- 6 comments
- Log in or register to post comments

Wrong algebra?
I'm sorry if this is a too specific question, I tried to use the Python parser but I am totally unfamiliar with Python and can't get it working.
I keep finding differences between my Mx and OpenMx analysis and I think I must have made a mistake in translating the following algebra:
in Mx:
G = (Y-X)@(A.((A.A)*(V-J))) + X@(A.((U-I)*(A.A)));
in OpenMx (wrong?):
algebraG = mxAlgebra(expression = (Y-X) %x% (A*((A*A)%*%(V-J))) + X %x% (A * ((U-I)%*%(A*A))), name = "G")
- Read more about Wrong algebra?
- 5 comments
- Log in or register to post comments

converting Mx scripts
There is a python script in the OpenMx package that will convert simple Mx 1.0 scripts into OpenMx scripts. The script is called mxParser.py. It can be found either in the /tools directory (in a binary installation of OpenMx) or in the /inst/tools directory (in a source installation of OpenMx). You will need the python library "ply" to run the script. Use "sudo easy_install ply" to install the ply library on your machine. To use the script from an arbitrary location, modify your $PATH environment variable.
- Read more about converting Mx scripts
- 3 comments
- Log in or register to post comments

A Perl based parser for Mplus syntax
UPDATE:
Version 0.3b available
UPDATE:
Newest version 0.2b handles PON and PWITH syntax.
UPDATE:
I have attached a newer version of the .pm file. I would welcome suggestions if anyone has some.
UPDATE:
This is a work in progress and is in need of some more work currently. Use at your own risk... you have been warned. :)
====original message below====
Greetings again,
- Read more about A Perl based parser for Mplus syntax
- 2 comments
- Log in or register to post comments
Pagination
- Page 1
- Next page