You are here

Full bivariate moderation model

3 posts / 0 new
Last post
EmilieRH's picture
Joined: 09/24/2020 - 04:43
Full bivariate moderation model
Binary Data Example script12.48 KB

Hi all,

I am trying to investigate how school performance modifies the genetic and environmental influences on intelligence running a full bivariate moderation model (a la the extended GxE model in Purcell 2002). However, my OpenMx results differ a lot from what my collaborator has obtained using the old Mx software, so I really hope that one of you can help me figure out what I have done wrong in the attached script.

The two data frames "datmz" and "datdz" that I load in the script contain data on MZ and DZ twin pairs, respectively. Each row in the data frames represents one twin pair. The data frames include six variables: defm1 (GPA for twin 1), defm2 (GPA for twin 2), m1 (GPA for twin 1), t1 (IQ for twin 1), m2 (GPA for twin 2), and t2 (IQ for twin 2). The variables I use are standardized residuals of the original variables after having regressed out the influences of sex and age. First, I run the full bivariate moderation model and afterwards I try to constrain (a) the common A, C, E, and unique A and E moderation paths to 0, and (b) all moderation paths to 0.

I am using OpenMx version 2.19.8 in R version 4.1.1 on the following platform: x86_64-w64-mingw32; my OpenMx's default optimizer is SLSQP.

Best regards,

AdminNeale's picture
Joined: 03/01/2013 - 14:09
Sorry for delay!

Hi Emilie!

Sorry to take so long to respond! If you could share the data files, or simulate data that also show the issue, it would help us to make progress. Knowing the classic Mx results (ideally, the script used to obtain them) would also help, although IDK if I still have a working classic Mx. Simulating data with mxGenerateData isn't helpful here because of the definition variables in Purcell GxE models.

A student and I are working on improving GxE modeling, and have been experiencing some difficulties recovering parameters, which we are slowly working through, but made some progress yesterday and hopefully, the new sims will be healthier.


EmilieRH's picture
Joined: 09/24/2020 - 04:43
Thanks for your reply!

Hi Mike,

Thanks for your reply! Since I posted my message, I have found out that my script worked fine as I managed to confirm the results using both the umxGxEbiv function and another function. Cheers!