Learn R Programming

FDRsampsize (version 1.0)

average.power: Compute average power for a given sample size

Description

Compute average power for given sample size, effect size, and p-value threshold

Usage

average.power (n, alpha, pow.func, eff.size, null.effect, ...)

Arguments

n
sample size
alpha
p-value cut off (scalar)
pow.func
an R function to compute statistical power
eff.size
effect size vector
null.effect
value of effect size that corresponds to null hypothesis
...
additional agruments for the functions

Value

References

Pounds, Stan, and Cheng Cheng. "Sample size determination for the false discovery rate." Bioinformatics 21.23 (2005): 4263-4271. Gadbury GL, et al. (2004) Power and sample size estimation in high dimensional biology. Statistical Methods in Medical Research 13(4):325-38. Jung, Sin-Ho. "Sample size for FDR-control in microarray data analysis." Bioinformatics 21.14 (2005): 3097-3104.

Examples

Run this code
 average.power(n=50,alpha=0.01,pow.func=power.twosampt,
               eff.size=rep(0:1,c(900,100)),null.effect=0)
 

Run the code above in your browser using DataLab