Learn R Programming

FDRsampsize (version 1.0)

alpha.fdr: Find the fixed p-value threshold that controls the FDR at a specified level

Description

Find the p-value threshold that satisfies an FDR requirement (if such a threshold exists)

Usage

alpha.fdr (fdr, n, pow.func, eff.size, null.effect, lam = 0.95, eps = 1e-04, tol = 1e-04, ...)

Arguments

fdr
Desired FDR, scalar
n
sample size
pow.func
an R function to compute statistical power
eff.size
effect size vector
null.effect
value of effect size that corresponds to the null hypothesis
lam
the lambda parameter in computing the pi0 (proportion of tests with a true null) estimate of Storey (2002)
eps
epsilon for numerical differentiation
tol
tolerance for bisection solution to alpha
...
additional agruments for the functions

Value

fdr
the FDR at that alpha
alpha
the determined alpha
OK
indicates if the requirement is met

References

A Onar-Thomas, S Pounds "FDRsampsize: An R package to Perform Generalized Power and Sample Size Calculations for Planning Studies that use the False Discovery Rate to Measure Significance", Manuscript 2015.

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
 alpha.fdr(fdr=0.1,n=50,pow.func=power.twosampt,
           eff.size=rep(0:1,c(900,100)),null.effect=0)
 

Run the code above in your browser using DataLab