I am 100% new to twin data and OpenMx, and so far the tutorials and documentations have been superbly helpful!
I used this [genetic epi path specification annotated guide] (https://vipbg.vcu.edu/vipbg/OpenMx2/docs//OpenMx/latest/GeneticEpi_Path.html#ace-model-a-twin-analysis) to decompose the variances of ACE on a given phenotype (my DV).
Now, though, I need to run a regression and I can't figure out how to feed the ACE variances from above into the regressions. I assume I have to constrain the parameters somehow?
I have a categorical IV (an unshared environmental factor) ~ continuous Phenotype DV + covariates
And my research question is whether the E (unshared environmental factor) is significantly associated with the DV, after controlling for A and C confounders.
Is there any documentation I missed on this script?
Thank you so much for any help.
You should post your script as it currently stands.
I don't follow this part. In particular, I think you mean "continuous Phenotype DV ~ categorical IV (an unshared environmental factor) + covariates"? Also, what makes you so sure the IV is nonshared-environmental? How many categories does it have, and are they ordered?
THanks, AdminRobK.
Script is below, but so far it just includes the ACE variance breakdown. I do not understand how to write the regression script (which is where I am stuck). To clarify your
:
1. You are right, I meant that the continuous DV ~ categorical IV + covariates
2. The IV being non-shared is the crux of my research question. My research question asks if going outdoors into nature affects mental health. So, the behavior of going outside into nature (which may have some genetic influences, but is also the observed difference in unshared environmental, i.e. the behavior) is hypothesized to be associated with improved mental health (the phenotype DV).
3. The IV has 5 categories, ordered.
Any help feeding my ACE model summary into the regression model is needed.
Let me be sure I understand. Your present script biometrically decomposes the variance in your continuous DV. You want to also regress the DV onto your ordinal IV and some nuisance covariates. You further want to biometrically decompose the ordinal IV. Is all that correct?
All correct!
OK, I have a quite clear idea of what your model would look like. I'm still not sure exactly what to change about your script.
Are your covariates age and sex, perhaps?
How about a simple bivariate genetic model? You can set this up as a Cholesky with covariates. There are many scripts here, but if that’s all you want to do, you might want to consider umx. The function umxACE will take care of this. If you go down the openmx road, be sure to to check out joint continuous ordinal examples with definition variables.
Subsequently you can observe the e cross path and do some testing with it. I.e. does model fit decrease significantly if you fix the path to zero?
I would recommend umxACEv instead of umxACE. The multivariate likelihood ratio tests for umxACE (the Cholesky version) are incorrect because of the non-negative definite constraints that the Cholesky implicitly forces. See Verhulst et al 2019 for more info on this issue.
OK, I'll assume that the two "nuisance" covariates are age and sex. In that case, since the biometrical variance decompositions of both the DV and the IV are of interest, the IV will need to be adjusted for age and sex as well.
Give the attached script a try. Obviously, I can't actually test it, since I don't have your dataset.
Note that there are alternate ways in which the location and scale of the latent liability underlying the ordinal IV could be identified.
Edit: my mistake--you'll need to use
latentVars=c(aceVars,dummyVars)
when you constructmodelMZ
andmodelDZ
.Thank you very much for your helpful script. Any suggestions on the best way to fix a covariance matrix that is not a definite positive?
How is the model-expected covariance matrix 6x6? I thought there were only two endogenous variables per twin, so it should be 4x4.
At any rate, it appears some paths that should be free are instead fixed to zero.
For the covariance not definite positive issue, I tried collapsing some of the categories but that didn't work