One option is to use lmer in a monte carlo simulation. I just did this last 
week. Check out the article published in the American Statistician and can be 
found at http://maven.smith.edu/~nhorton/R/r.pdf.

The article is not about power per se, but is about R as a toolbox for 
mathematical statistics. But, it has a section illustrating how to do power 
calculations via simulation using the nlme package in R, which is the function 
for multilevel models. 

I simulate data for clustered designs differently than the authors and I also 
use lmer2() in the lme4 package and not nlme as it is much, much faster.

We needed to know how many clusters to have to obtain sufficient power. I ran 
power calculations for a decently complex model with cluster sizes of 10 to 200 
in increments of 10 (i.e., 10, 20, ..., 200) with 1000 iterations at each 
cluster size. This is a total of 20,000 iterations (20 * 1000) and took about 
1.5 hours on my desktop machine. 

There are power calculators, like Optim, but simulation gives you much more 
flexibility and the option to estimate power in situations where formulae do 
not exist.

Harold

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Julien
> Sent: Wednesday, April 04, 2007 10:40 AM
> To: [email protected]
> Subject: [R] Power analysis and mixed model
> 
> Hi 
> 
> Is there any way to compute power analysis for a mixed model ?
> 
> Julien
> 
>  
> 
> Julien Martin
> 
> Candidat au Doctorat
> 
> Laboratoire de Marco festa-Bianchet
> 
> Université de Sherbrooke
> 
> Sherbrooke, Québec
> 
> J1K 2R1 Canada
> 
> 819 821 8000 poste 62059
> 
>  
> 
> 
> -- 
> 
> Checked by AVG Free Edition.
> 
> 12:48
>  
> 
>       [[alternative HTML version deleted]]
> 
>

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to