Learn R Programming

pi0 (version 1.4-1)

fdr: False Discovery Rate (FDR) Estimation Based on a Given Estimate of Pi0

Description

This function estimate the qvalue based on p-values and an estimate of the proportion of true null hypotheses, pi0.

Usage

fdr(p, pi0 = 1)

Arguments

p

a numeric vector of p-values

pi0

numeric, a given estimate of the proportion of true null hypotheses, \(\pi_0\), truncated to [0,1]. The default pi0=1 is the conservative Benjamini and Hochberg (1995) version.

Value

a numeric vector of the same length as p, giving the estimated q-values corresponding to each p-value.

Details

The estimation of q-value/FDR is the simple and quick plug-in method: $$q_i =\min_{i \le j \le G} G*\pi_0 * p_{(j)}/j $$.

References

Benjamini, Y., Hochberg, Y. (1995) Controlling the False Discovery Rate: A Practical and Powerful Approach to Multiple Testing. Journal of the Royal Statistical Society, Series B (Methodological) 57, 289-300 Storey, J.D., Tibshirani, R. (2003) Statistical significance for genomewide studies. The Proceedings of the National Academy of Sciences 100, 9440-9445

See Also

qvalue, mt.rawp2adjp

Examples

Run this code
# NOT RUN {
set.seed(9992722)
pvals=runif(5e4)^1.5 ## simulate some fake 'p-values'
library(qvalue)
qvalObj=qvalue(pvals)  ## warning: this may be slow! 
fdrObj=fdr(pvals,qvalObj$pi0)
all.equal(fdrObj,qvalObj$qval) ## should be TRUE
# }

Run the code above in your browser using DataLab