21.1 方差分析检验的功效

power.anova.test() 计算平衡的单因素方差分析检验的功效

usage(power.anova.test)
power.anova.test(groups = NULL, n = NULL, between.var = NULL, within.var = NULL,
    sig.level = 0.05, power = NULL)
power.anova.test(
  groups = 4,       #  4 个组  
  between.var = 1,  # 组间方差为 1
  within.var = 3,   # 组内方差为 3
  power = 0.95      # 1 - 犯第二类错误的概率
)
## 
##      Balanced one-way analysis of variance power calculation 
## 
##          groups = 4
##               n = 18.18245
##     between.var = 1
##      within.var = 3
##       sig.level = 0.05
##           power = 0.95
## 
## NOTE: n is number in each group