script for ACE model with covariates using paths specification
Posted on
lior abramson
Joined: 07/21/2017
Forums
Hello,
Does anyone know where can I find a reliable example of an openMX script to an ACE model with covariates (e.g., age) using path specifications? I saw that there is an example with matrices analysis, but since I only now begin to get my hold on openMX, I would like to understand the syntax of paths analyses before jumping to a new method...
Does anyone know where can I find a reliable example of an openMX script to an ACE model with covariates (e.g., age) using path specifications? I saw that there is an example with matrices analysis, but since I only now begin to get my hold on openMX, I would like to understand the syntax of paths analyses before jumping to a new method...
Also,do you know on some kind of a workshop (somewhere in the world or online) that teaches openMX and twins analyses from the beginning?
Thanks!
I'm sure such an example
You could try adapting an existing path-specified script to include a covariate. The simplest way to do that would be to include covariate for twin #1 and covariate for twin #2 as additional manifest variables. Each would have a one-arrow path going from it to its twin's phenotype, and each would need a two-arrow path going from it to itself. Make sure the one-arrow paths have the same label, and make sure the two-arrow paths have the same label, i.e. the effect of the covariate should be the same for both twins, and the variance of the covariate should be the same for both twins. Finally, make sure there is a two-arrow path connecting twin 1's covariate to twin #2's covariate.
You might also be interested in the
umxACE()
function from the 'umx' package.Log in or register to post comments
In reply to I'm sure such an example by AdminRobK
Thank you
So, this model applies also if my observed covariates truly have a correlation of 1 between the two twins? (all my covariates are shared by definition). and if so, can I write that the relation between them is not free (i.e., free=FALSE) and constrain them to 1?
Will definitely look at the Boulder workshop, Thank you!
Log in or register to post comments
In reply to Thank you by lior abramson
a simpler setup
In your case, you could just create one additional manifest variable for each covariate, make two same-labeled one-arrow paths from the covariate to each twin's phenotype, and make a two-arrow path from the covariate to itself. If a covariate is perfectly correlated between twins, you don't want to make two manifest variables (one per twin) for it, because then your model would have two perfectly correlated manifest variables, and the resulting covariance matrix would be singular.
Careful--unless you've standardized all manifest variables ahead of time (not generally advised), the coefficient on the path between the two covariate nodes is a covariance, not a correlation, and therefore in general should be a free parameter to be estimated. But in your particular case, you don't want to have two covariate nodes in the first place, due to the singularity issue I mentioned above.
Log in or register to post comments
workshop
Log in or register to post comments