Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The pwr package, developed by Stéphane Champely, implements power analysis as outlined by Cohen (1988). Some of the more important functions are listed in table 10.1. For each function, the user can specify three of the four quantities (sample size, significance level, power, effect size) and the fourth will be calculated.
| Function | Power calculations for |
|---|---|
| pwr.2p.test() | Two proportions (equal n) |
| pwr.2p2n.test() | Two proportions (unequal n) |
| pwr.anova.test() | Balanced one-way ANOVA |
| pwr.chisq.test() | Chi-square test |
| pwr.f2.test() | General linear model |
| pwr.p.test() | Proportion (one sample) |
| pwr.r.test() | Correlation |
| pwr.t.test() | t-tests (one sample, two sample, paired) |
| pwr.t2n.test() | t-test (two samples with unequal n) |