Hi,

I currently need to examine the correlation between additive gene (A) and moderators (such as SES and home language exposure). However, I don't have the OpenMx scripts to conduct rGE (gene-moderator correlation). Can anyone here provide me with an example script of rGE or tell me where I can find such scripts? I would be grateful very much!

Could you say more about the kind of analysis you want to do?

Many thanks!

In a model containing A, C, E, and M (moderator, identified environment), I want to see the correlation between A and M (rGE), similar to the one in the picture attached. Could anyone here provide me with example OpenMx scripts to run this model?

Hi,

If I understand you right, you want to estimate a bivariate AE-model where the unique paths of P are moderated by M.

You could begin with a bivariate model (see here) and then add some objects with M defined as a definition variable, the moderated paths coefficients and the moderated variance components (see here: I think the objects

`defAge1`

to`covPI`

are what you are looking for.). To get used to the syntax I recommend the materials of the Quantitative Genetics course by Hermine Maes and you might be interested in the materials of the Boulder Workshops. Another possibility is to estimate a "normal" bivariate moderation model and constrain the moderation of the cross-paths to zero. I think with umx the implementation is quite straightforward. You might want to check out a wrapper function for OpenMx where you can estimate the desired model directly. Note, however, that it's still work in progress.All in all, I would begin with a bivariate moderation model unless you have strong apriori reasons not to moderate the cross-paths.

The rGE you can calculate as a secondary statistic. The formulas are strightforward and I'm sure, here in the forum or in the course materials you will find them.

I hope this helps!

Many sincere thanks, and your information provided to me is indeed useful.

We want to have the Bivariate moderation model as the attached picture shows. I find the OpenMx scripts on the website (https://vipbg.vcu.edu/media/course/HGEN619_2015/twin2ModBivAceCon.R), but how can we see whether the genetic influence on moderator (am) is significant or not?

That depends: are you going to test that hypothesis in a model that includes moderation effects or not? My guess is "not". In that case, do the following. First, use

`omxSetParameters()`

to make a new MxModel object that has 'am' and 'ac' fixed to zero. Then, run the new MxModel. Finally, use`mxCompare()`

to compare that model, and the model you ran that had 'am' and 'ac' freely estimated.Many thanks for your reply!

After reading posts in this forum, now I understand that the Bivariate moderation ACE model is similar to the Bivariate Cholesky model. We simply see the moderator as the first phenotype. Therefore, I can set confidence interval in the model to see whether the moderative effect is significant or not (just like the Cholesky model).

If I am not interested to see the moderative effect on E, I can simply build the Bivariate AC model with moderator.

Is my understanding correct?

I am not completely sure that's correct, because the moderated variance component is quadratic in the moderation coefficient. So, the sign on the moderation coefficient might be indeterminate.