You are here

Power calculation

6 posts / 0 new
Last post
Julia's picture
Joined: 03/29/2012 - 09:40
Power calculation

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!

brandmaier's picture
Joined: 02/04/2010 - 20:45
You should have a look at

You should have a look at simsem: This package provides among other things some wrapper functions around OpenMx models to do Monte Carlo power simulations.


lmunoz's picture
Joined: 06/02/2015 - 19:12
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?



Julia's picture
Joined: 03/29/2012 - 09:40
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.

tbates's picture
Joined: 07/31/2009 - 14:25
free power scripts

Brad Verhulst has now shared a set of functions for power analysis in the classical twin design here:

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.

AdminNeale's picture
Joined: 03/01/2013 - 14:09
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