Hi Everyone,
I received suggestions to correct the the raw score for age and sex main effects, and for the age x sex interaction. However, I am not familiar with this procedure, does someone knows more about it?
So far, what I had done was to insert age a covariate in my analysis.
Thanks!
I snagged this from https://stackoverflow.com/questions/20907583/how-to-return-predicted-values-residuals-r-square-from-lm
which is ok, but to get the interaction term I am told you need to use * instead of + for the independent variables (age & sex): lm(y~age*sex)
FYI,
umx_residualize()
packages this up cleanly, and works for wide data.The help page is useful, but:
twin example
multiple left hand side variables