Learn R Programming

FDRsampsize (version 1.0)

power.oneway: Compute power of one-way ANOVA

Description

Compute power of one-way ANOVA;Uses classical power formula for ANOVA;Assumes equal variance and sample size

Usage

power.oneway (n, alpha, theta, k = 2)

Arguments

n
per-group sample size (scalar)
alpha
p-value threshold (scalar)
theta
sum of ((group mean - overall mean)/stdev)^2 across all groups for each hypothesis test (vector)
k
the number of groups to be compared, default k=2

Value

Details

For many applications, the null effect is zero for the parameter theta described above.

Examples

Run this code
 power.oneway        # show the power function
 res=fdr.sampsize(fdr=0.1,
                  ave.pow=0.8,
                  pow.func=power.oneway,
                  eff.size=rep(c(2,0),c(100,900)),
                  null.effect=0,
                  k=3)
 res

Run the code above in your browser using DataLab