A question about moderator variable
Posted on
YiTan
Joined: 10/08/2014
Forums
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
Try the User's Guide
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
Log in or register to post comments
In reply to Try the User's Guide by mhunter
Hi Mike, Let's say I'm
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
Log in or register to post comments
In reply to Hi Mike, Let's say I'm by YiTan
Yi, would you mind writing a
Log in or register to post comments
In reply to Yi, would you mind writing a by RobK
Hi Rob, Thanks for your
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
Log in or register to post comments
Hi, Yi. At the Boulder
Unfortunately, I don't have an example script to refer you to at the moment. :-/
BTW, is the moderator a continuous variable?
Log in or register to post comments
In reply to Hi, Yi. At the Boulder by RobK
Thanks Rob! The lecture notes
Cheers,
Yi
Log in or register to post comments