fdr: False Discovery Rate (FDR) Estimation Based on a Given...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

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

Usage

1
fdr(p, pi0 = 1)

Arguments

p

a numeric vector of p-values

pi0

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

Details

The estimation of q-value/FDR is the simple and quick plug-in method:

q_i = min_{i<=j<=G} G*pi0*p_(j)/j

.

Value

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

Note

This implementation avoids explicit loops and is much faster when the number of p-values are very large.

Author(s)

Long Qu

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

1
2
3
4
5
6
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

Example output

Attaching package: 'qvalue'

The following object is masked from 'package:pi0':

    lfdr

[1] TRUE

pi0 documentation built on July 9, 2017, 9:01 a.m.