Learn R Programming

pwr (version 1.0)

pwr-package: Basic power calculations pwr

Description

Power calculations along the lines of Cohen (1988) using in particular the same notations for effect sizes. Examples from the book are given.

Arguments

Details

ll{ Package: pwr Type: Package Version: 1.0 Date: 2006-01-10 License: GPL version 2 or newer } This package contains functions for basic power calculations using effect sizes and notations from Cohen (1988) : pwr.p.test : test for one proportion (ES=h) pwr.2p.test and pwr.2p2n.test : test for two proportions (ES=h) pwr.t.test : t tests for means (ES=d) pwr.anova.test : test for one-way balanced anova (ES=f) pwr.r.test : correlation test (ES=r) pwr.chisq.test : Chi-squared test (ES=w)

References

J. Cohen (1988) Statistical power analysis for the behavioral scientist. Lawrence Erlbaum Associates, publishers.

Examples

Run this code
## Exercise 8.1 p. 357 from Cohen (1988) 
pwr.anova.test(f=0.28,k=4,n=20,sig.level=0.05)

## Exercise 6.1 p. 198 from Cohen (1988)
pwr.2p.test(h=0.3,n=80,sig.level=0.05,alternative="one.sided")

## Exercise 7.3 p. 251 from Cohen (1988)
pwr.chisq.test(w=0.346,df=(2-1)*(3-1),N=140,sig.level=0.01)

## Exercise 6.5 p. 203 from Cohen (1988)
pwr.p.test(h=0.2,n=60,sig.level=0.05,alternative="two.sided")

Run the code above in your browser using DataLab