Attachment | Size |
---|---|
LGC Script.R [6] | 8.65 KB |
I am working with the script I received at the workshop in Boulder earlier this year. I have altered the original script slightly to fit my data, but I am getting the following error messages in this section of my script:
#MZ AND DZ EXPECTED MATRICES
>
> # Algebra for expected Int & Slope means + sex effects (betas) for MZs
> mxModel("MZ",
+ mxData(data.frame(mzData,mzDefs), type="raw",) # Requests MZ definition variables: GENDER_1 & GENDER_2
+ mxMatrix( type="Full", nrow=1, ncol=1, free=FALSE, labels=c("data.GENDER_1"), name="GENDER_1"), # Selects GENDER_1 from mzDefs
Error: unexpected symbol in:
" mxData(data.frame(mzData,mzDefs), type="raw",) # Requests MZ definition variables: GENDER_1 & GENDER_2
mxMatrix"
> mxMatrix( type="Full", nrow=1, ncol=1, free=FALSE, labels=c("data.GENDER_2"), name="GENDER_2"), # Selects GENDER_2 from mzDefs
Error: unexpected ',' in " mxMatrix( type="Full", nrow=1, ncol=1, free=FALSE, labels=c("data.GENDER_2"), name="GENDER_2"),"
> #1X1 MATRIX OF THE TWINS SEX ABOVE FOR TWIN 1S SEX AND TWIN 2S SEX
> # Classic Mx means model=(F * (M+(sex_t1@Betas)))' | (F * (M+(sex_t2@Betas)))'
> mxAlgebra(expression=cbind( t(ACE.F %% ( ACE.Mean + (GENDER_1 %x% ACE.Beta))),
+ t(ACE.F %% ( ACE.Mean + (GENDER_2 %x% ACE.Beta))) ), name="expMean"),
Error: unexpected ',' in:
"mxAlgebra(expression=cbind( t(ACE.F %% ( ACE.Mean + (GENDER_1 %x% ACE.Beta))),
t(ACE.F %% ( ACE.Mean + (GENDER_2 %x% ACE.Beta))) ), name="expMean"),"
> mxFIMLObjective( covariance="ACE.expCovMZ", means="expMean", dimnames=selVars ) ),
Error: unexpected ')' in " mxFIMLObjective( covariance="ACE.expCovMZ", means="expMean", dimnames=selVars ) )"
I have attached the full script, and would greatly appreciate any assistance. Thanks very much!
Jamie