Learn R Programming

FDRsampsize (version 1.0)

afdr: Compute the anticipated FDR

Description

Compute the anticipated FDR for given sample size, p-value threshold, and effect size.

Usage

afdr (n, alpha, pow.func, eff.size, lam = 0.95, eps = 1e-04, ...)

Arguments

n
sample size (scalar)
alpha
p-value cut-off (scalar)
pow.func
an R function that computes statistical power
eff.size
effect size vector
lam
p-value at which to evaluate ensemble PDF (for pi.star)
eps
epsilon for numerical differentiation
...
additional agruments for the functions

Value

Details

The aFDR is defined by Pounds and Cheng (2005) as the anticipated false discovery rate incurred by performing all tests with p-value threshold alpha given the same size effect size and power function.

References

Pounds, Stan, and Cheng Cheng. "Sample size determination for the false discovery rate." Bioinformatics 21.23 (2005): 4263-4271. Jung, Sin-Ho. "Sample size for FDR-control in microarray data analysis." Bioinformatics 21.14 (2005): 3097-3104.

Examples

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

Run the code above in your browser using DataLab