Hi.
We are planning to do some moderation model analysis on the new data (which we do not have yet) and need to do power analysis before. Is there any script written for OpenMx how to do it? I found some scripts for calssical Mx, but I am not sure I am able to adjust it to moderation models and even if, the output seems to be not compatible with 64-bit Windows.
I would appreciate any help for simulating data driven by such models and for calculating the power.
Thank you beforehand!
Julia
You should have a look at simsem: http://simsem.org. This package provides among other things some wrapper functions around OpenMx models to do Monte Carlo power simulations.
cheers,
Andreas
Hi Julia,
I was wondering if you were able to find a solution to this. I am now starting to work on a power analysis for a moderation model and am running into multiple issues. Were you able to find an OpenMx script to do this?
Thanks!
Liz
Hi Liz,
No, unfortunately I haven't managed to find such a script. To be honest, I don't remember what we ended up doing, but it was definitely not an OpenMx script.
Brad Verhulst has now shared a set of functions for power analysis in the classical twin design here:
http://www.people.vcu.edu/%7ebverhulst/power/power.html
Another approach is to use umx_make_TwinData (smart wrapper for mvnorm) to generate data conforming to the pattern of effects you expect:
nb: December 2016 umx version 1.5.0 contains bug fix in this function!
Run your model on this data to see if you can detect whatever effect you are looking for. Put this inside a for loop, run for 100,000 times. Power = how often you got p<.05 in your results.
Do you have moderator models in umx_make_TwinData? The ?umx_make_TwinData doesn't give a lot of details, and the function seems to permit moderation of a but not the other variance components.
Thanks so much (and apologies for the delayed reply)! I will give this a try for future submissions.