convest: Estimate Proportion of True Null Hypotheses

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

View source: R/convest.R

Description

Returns an estimate of the proportion of true null hypotheses using a convex decreasing density estimate on a vector of p-values.

Usage

1
convest(p, niter = 100, doplot = FALSE, doreport = FALSE)

Arguments

p

numeric vector of p-values, calculated using any test of your choice. Missing values are not allowed

niter

number of iterations to be used in fitting the convex, decreasing density for the p-values. Default is 100.

doplot

logical, should updated plots of fitted convex decreasing p-value density be produced at each iteration? Default is FALSE.

doreport

logical, should the estimated proportion be printed at each iteration? Default is FALSE.

Details

The proportion of true null hypotheses is often denoted pi0.

Value

Numeric value in the interval [0,1] representing he estimated proportion of true null hypotheses, with class being convest and the lfdr attribute containing estimated local false discovery rates.

Author(s)

Long Qu slightly modified and convest function by Egil Ferkingstad and Mette Langaas in limma package.

References

Langaas, M., Ferkingstad, E., and Lindqvist, B. (2005). Estimating the proportion of true null hypotheses, with application to DNA microarray data. Journal of the Royal Statistical Society Series B, 67, 555-572. Preprint at http://www.math.ntnu.no/~mettela/

See Also

See 08.Tests for other functions for producing or interpretting p-values.

Examples

1
2
3
set.seed(9992722)
pvals = runif(5e3)^1.5
convest(pvals, niter=50)[1]

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