Power calculation
Posted on

Forums
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
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
Log in or register to post comments
Power calculation for mdoeration model analysis
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
Log in or register to post comments
Hi 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.
Log in or register to post comments
free power scripts
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:
str(umx_make_TwinData(nMZpairs = 100, 100, a = 1, c = 0, e = 0))
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.
Log in or register to post comments
In reply to free power scripts by tbates
Do you have moderator models
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.
function (nMZpairs, nDZpairs, a = c(avg = 0.5, min = 0, max = 1), c, e)
Log in or register to post comments
In reply to free power scripts by tbates
Thank you
Thanks so much (and apologies for the delayed reply)! I will give this a try for future submissions.
Log in or register to post comments