Bivariate Cholesky model with one continuous and ordinal variable
Posted on
Leo
Joined: 01/09/2020
Forums
I'm new to OpenMx and I'm trying to understand the Boulder workshop scripts.
Particularly, I am trying to fit a model with one continuous and one ordinal variable. I have found this script but it is modeling only two ordinal variables:
http://ibg.colorado.edu/cdrom2016/maes/UnivariateAnalysis/twoa/twoACEoa.R
Is there a shortcut to only apply the threshold to one variable?
Thanks in advance.
umx
I think umx will fit the model you want fairly painlessly. Note that while it doesn't have the explicit scripting that writing in 'base' OpenMx provides, umx does return OpenMx model objects, which can be inspected and modified to test submodels etc.
Another place to look is in the inst/models/passing directory of the installation (or on GitHub here: https://github.com/OpenMx/OpenMx/blob/master/inst/models/passing/JointFIMLTest.R) which has examples of joint FIML, albeit not twinified.
Log in or register to post comments
In reply to umx by AdminNeale
Thank you for your help.
umx is great. However, I would like to understand what is happening in the background. Can you recommend any literature similar to
Neale, M. C., & Maes, H. H. M. (2004). Methodology for Genetic Studies of Twins and Families. Kluwer Academic Publishers B.V.
with OpenMx instead of MX? That is, any literature that gives more insight into twin models with matrix specification besides mentioned literature. Coming from social sciences, I find path specification more intuitive but most scripts I find have matrix specification. Right now I am looking at the Boulder presentations and scripts, the mentioned methodology book and the OpenMx documentation.
Log in or register to post comments
umxACE(selVars = c("myOrd", "myCont"), ...)
1. If you had "myOrd_T1" and "myOrd_T2" ordinal vars and "myCont_T1" and "myCont_T2" continuous vars in your Data, you just execute:
m1= umxACE("my model",
selVars = c("myOrd", "myCont"), sep = "_T",
mzData = mzData, dzData = dzData
)
2. The nice thing about umx, is the functions *are* scripts. So if you just type the function name without the trailing (), then press return, you'll see all the raw matrix algebra. Plus all the code is open, commented, and editable on [github.com/tbates/umx](https://github.com/tbates/umx)
3. You might be interested to play with `umxTwinMaker` It let's you build twin models using `umxPaths`, but you only specify twin1 - it takes care of the rest. Cuts 90% of the work. RAM runs slower, but not much, and all the plot and umxSummary inc. std run on arbitrary models (these are extra custom coding work for each new matrix based model).
Log in or register to post comments