Hi all,

I'm new to OpenMx and SEM, and I have just read through the various examples on twin modelling. Just wondering, if I have a moderator variable which varies within twin 1 and twin 2 and also across twin pairs, how do I go about specifying it as a definition variable? Or do I have to do bivariate analysis instead (treating the moderator variable as another variable?)

Thank you very much!

Cheers,

Yi

Hi Yi,

If your question is about how to set up a model with a definition variable in general, then the User's Guide should be helpful. Here is a link to a User's Guide chapter on using definition variables. It also has related code examples linked within it.

http://openmx.psyc.virginia.edu/docs/openmx/latest/DefinitionMeans_Matrix.html

The gist is this: A definition variable takes a variable from your data set and uses it as part of the model. An example of a definition variable is using a variable as the correlation coefficient between the twins' A components in an ACE model. You can use a definition variable by referring to "data.YourVariable" in the labels of a matrix or path. You can then use that matrix or path directly or in algebras that further manipulate the variable.

If twin 1 and twin 2 have different values for the definition variable, then you'll need two definition variables: one for twin 1 and another for twin 2.

If your question is about how to set up a specific model with a definition variable, then I'd need more information on the model you're trying to fit.

Cheers,

Mike Hunter

Hi Mike,

Let's say I'm interested in finding the A,C and E contributions on chess playing ability, with the years of chess training as the moderator. I'm not very sure how to set different definition variables for twin 1 and twin 2 in this case. How similar or different would this approach be from the usual bivariate modeling (if I treat the years of chess training simply as another manifest variable) ?

Thanks in advance!

Cheers,

Yi

Yi, would you mind writing a script that does the "usual bivariate modeling" for your data and sharing it? I think I know which modifications would have to be made.

Hi Rob,

Thanks for your reply. Basically I'm using this script by Hermine Maes to do the bivariate twin analysis: http://www.vipbg.vcu.edu/imsg2012/R/twinBivAceCon.R

But instead of height and weight I used chess playing ability and years of chess training as the two variables.

Thanks in advance for your help!

Best Regards,

Yi

Hi, Yi. At the Boulder Workshop this year, Conor Dolan gave a presentation that I think will partially answer your question. In particular, note slides #39-43, and the van der Sluis et al. (2012) article referenced on slide #2. As a rule, you will want to do a "bivariate" analysis in which the moderator is treated as another endogenous variable and a random regressor, and is itself biometrically decomposed. There are exceptions to this rule, but you've already said that the moderator varies within twin pairs, so it definitely doesn't meet the major exception, and it's unlikely to meet the two minor exceptions.

Unfortunately, I don't have an example script to refer you to at the moment. :-/

BTW, is the moderator a continuous variable?

Thanks Rob! The lecture notes are very helpful, I'm still reading through and trying to understand at the moment. Yes, the moderator is continuous. How similar/ different would my analysis be from the usual bivariate analysis?

Cheers,

Yi