[R] power analyses for mixed effects lmer models
Ben Bolker
bolker at ufl.edu
Wed Jan 14 21:37:15 CET 2009
Greg Snow <Greg.Snow <at> imail.org> writes:
>
> My preferred method for this type of thing is to use simulation.
> You have already done the hard parts in
> figuring out what your data is going to look like and how you plan
> to analyze it. Now just write a function
> that will simulate data according to your pattern and with
> the difference(s) that you want to compute the
> power for, then analyzes the simulated data and returns the
> value of interest (usually a single p-value,
> but could be something else). Now run this function a bunch of times
> (I would use the replicate function to
> do this) and see how often the conclusion of interest occurs
> (p-val < alpha, or something else). This is
> your estimate of power.
Agreed.
There are power calculators out there for standard
ANOVA designs, even mixed models
e.g. <http://www.stat.uiowa.edu/~rlenth/Power/> ,
but they're very unlikely to work for a crossed-random-effects
model with a continuous and a categorical predictor.
If you have further questions along these lines I would
recommend the r-sig-mixed-models list.
Ben Bolker
More information about the R-help
mailing list