I want to study if the similarity (through A and C) between female twin and male twin, within pair, changes due to a moderator (as age) using the GxE approach of Purcell (2002) in a sex-limitation model.
I thought to put it in a very simple way such as:
rados <- mxMatrix(type="Full", nrow=1, ncol=1, free=F, values=0.5, label="rg", lbound=-1, ubound=1, name="ra") rcdos <- mxMatrix(type="Full", nrow=1, ncol=1, free=T, values=.01, label="re", lbound=-1, ubound=1, name="rc") #I am currenty interested in the moderation of rc rBados <- mxMatrix(type="Full", nrow=1, ncol=1, free=F, values=0, label="rBg", name="rBa") rBcdos <- mxMatrix(type="Full", nrow=1, ncol=1, free=T, values=.01, label="rBe", name="rBc") regRa <- mxAlgebra(expression= ra+DefVar*rBa, name = "regRg") #being DefVar any continuous definition variable regRc <- mxAlgebra(expression= rc+DefVar*rBc, name = "regRe") covDZo <- mxAlgebra( expression= regRg%x%(am%*%t(af))+regRe%x%(cm%*%t(cf)), name="covDZmf" )
But I'm not sure if this is both statistically and theoretically correct, and I can't find this information in the papers or textbooks available to me. Is it possible to do it like this?
Also, I want to implement this MxAlgebra along with a moderation of the variance components.
Thank you very much in advance for any insight you could give me about this.