Adding Covariate to ACE Ordinal Model -- Troubleshooting
My goal: I want to calculate the variance components for a simple dichotomous variable in which twins can answer in one of two ways -- yes or no. I want to run and compare ACE, AE, and CE models.
Thanks to what's available on this board, I was able to do this using the fabulous "UnivACE_MatrRawOrd.R" script (http://openmx.psyc.virginia.edu/sites/default/files/UnivACE_MatrRawOrd.R).
I'm concerned about the influence of a covariate on "C," so I've decided to add it into the model. It's a continuous score on maternal aptitude so it's the same for both twins, the minimum value is 1.2.
I tried to tweak the script I found in this thread (http://openmx.psyc.virginia.edu/thread/554) and at long last ended up with an ACE model that actually ran! However, I'm basically getting exactly the same results as without the covariate, which is weird. I'm wondering if something has gone wrong with
1) The way I have the covariate included in the model or
2) the way I'm setting up my data before creating the model. I'm starting with a .dat file without a header that contains 4 variables, and i'm naming them zyg, cast90_tw1, cast90_tw2, and read (which is the maternal aptitude score). When I initially ran the model without the covariate, I had to use mxfactor, but I'm not entirely sure if I'm using it correctly now.
My syntax for setting up the data and the ACE model is attached.
Any assistance would be extremely welcome!
Oops
Log in or register to post comments
In reply to Oops by RFrank
Wrong mean algebra?
mxFIMLObjective( covariance="ACE.expCovMZ", means="ACE.expMean", dimnames=selVars, thresholds="ACE.expThre" )
refers to the expCovMZ in the ACE model. However, what you want is the one in the MZ model (which happens to be the current model) so you should be saying
mxFIMLObjective( covariance="ACE.expCovMZ", means="expMeanMZ", dimnames=selVars, thresholds="ACE.expThre" )
and do the same sort of thing for the DZ model.
Log in or register to post comments
In reply to Wrong mean algebra? by neale
Thank you!
Log in or register to post comments