You are here

Full bivariate moderation model

3 posts / 0 new
Last post
EmilieRH's picture
Offline
Joined: 09/24/2020 - 04:43
Full bivariate moderation model
AttachmentSize
Binary Data Example script12.41 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,
Emilie

AdminNeale's picture
Offline
Joined: 03/01/2013 - 14:09
Which one is correct

Classic Mx is no longer supported. However, there are some ways to investigate. First, which of the two has the lowest -2lnL? Second, if you take the estimates from whichever got the lowest -2lnL, and plug them in as starting values to the other software, and fix every parameter, do you get the same -2lnL? If not it suggests that there's either a bug or the models are not specified to be exactly the same.

EmilieRH's picture
Offline
Joined: 09/24/2020 - 04:43
Script example?

Thank you for your reply! My collaborator has extensive experience in running this kind of GxE model in classic Mx, so I think the problem is my R script as I am still pretty new to OpenMx and GxE modelling and therefore have relied on modifying a script I found online to my data. Do you know where I can find a reliable script example that shows how to model the full bivariate moderation model, or can you see if my script is correct?