Age&Gender Covariates; Continuous data; Multivariate Analysis
Posted on

Forums
Hi all,
I would like to covariate for age & gender in a multivariate analysis. I found scripts to covariate but in ordinal data and in univarite analysis.
It would be really helpful for me it any of you could show me an example of a script on how to covariate (by age and gender) in a MV analysis, because I now from my previous univariate analysis that gender could be causing some genetic sex differences in 4 of the 6 traits that Iām using.
Thank you very much!!!
Univariate with age and sex
http://www.vipbg.vcu.edu/NIDAworkshop2012/twinACECovSexAge.R
Part of
http://www.vipbg.vcu.edu/NIDAworkshop2012
It's easy enough to make it multivariate for the Cholesky at least, increase the number of variables (nv) and make the matrices lower triangular:
pathA <- mxMatrix( type="Lower", nrow=nv, ncol=nv, free=TRUE,
values=.6, label="a11", name="a" )
pathC <- mxMatrix( type="Lower", nrow=nv, ncol=nv, free=TRUE,
values=.6, label="c11", name="c" )
pathE <- mxMatrix( type="Lower", nrow=nv, ncol=nv, free=TRUE,
values=.6, label="e11", name="e" )
Log in or register to post comments