You are here

Bivariate Cholesky model with one continuous and ordinal variable

4 posts / 0 new
Last post
Leo's picture
Leo
Offline
Joined: 01/09/2020 - 14:36
Bivariate Cholesky model with one continuous and ordinal variable

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.

AdminNeale's picture
Offline
Joined: 03/01/2013 - 14:09
umx

Hello Leo

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.

Leo's picture
Leo
Offline
Joined: 01/09/2020 - 14:36
Thank you for your help.

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.

tbates's picture
Offline
Joined: 07/31/2009 - 14:25
umxACE(selVars = c("myOrd", "myCont"), ...)

Just to follow up:

  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
)
  1. 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

  2. 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).