27.10 Examples

pwr.t.test(n=NULL, d=(1000-950)/50,
           sig.level=0.05,
           power=0.8, type="two.sample",
           alternative="two.sided")
## 
##      Two-sample t test power calculation 
## 
##               n = 17
##               d = 1
##       sig.level = 0.05
##           power = 0.8
##     alternative = two.sided
## 
## NOTE: n is number in *each* group
pwr.anova.test(
    k = 2, f = var(c(950,1000))/50^2,
    sig.level = .05, power = .8, n=NULL)
## 
##      Balanced one-way analysis of variance power calculation 
## 
##               k = 2
##               n = 17
##               f = 0.5
##       sig.level = 0.05
##           power = 0.8
## 
## NOTE: n is number in each group