StATS: R libraries for sample size justification (July 28, 2006)

There are a lot of good commercial and free sources for sample size justification. Note that most people use the term power calculation, but there is more than one way to justify a sample size, so I try to avoid the term "power calculation" as being too restrictive. Anyway, I just noted an email on the MedStats list that suggests two R libraries.

The MBESS R package

estimates sample size by setting a goal on how precise you want the confidence intervals to be. It has a nice function that looks at the confidence interval for R-squared that would be hard to find in most other places.

The pwr R package:

uses a more traditional approach that follows the effect size notation noted in Cohen's book on sample size.

Key papers, books and website

This page was written by Steve Simon while working at Children's Mercy Hospital. Although I do not hold the copyright for this material, I am reproducing it here as a service, as it is no longer available on the Children's Mercy Hospital website. Need more information? I have a page with general help resources. You can also browse for pages similar to this one at Category: R software or Category: Sample size justification.