You are here

A question about moderator variable

7 posts / 0 new
Last post
YiTan's picture
Offline
Joined: 10/08/2014 - 05:28
A question about moderator variable

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

mhunter's picture
Offline
Joined: 07/31/2009 - 15:26
Try the User's Guide

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

YiTan's picture
Offline
Joined: 10/08/2014 - 05:28
Hi Mike, Let's say I'm

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

RobK's picture
Offline
Joined: 04/19/2011 - 21:00
Yi, would you mind writing a

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.

YiTan's picture
Offline
Joined: 10/08/2014 - 05:28
Hi Rob, Thanks for your

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

RobK's picture
Offline
Joined: 04/19/2011 - 21:00
Hi, Yi. At the Boulder

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?

YiTan's picture
Offline
Joined: 10/08/2014 - 05:28
Thanks Rob! The lecture notes

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