propTrueNull(p, method="lfdr", nbins=20, ...)
convest(p, niter=100, plot=FALSE, report=FALSE, file="", tol=1e-6)"lfdr", "mean", "hist" or "convest".method="hist").convest if method="convest".method="lfdr" implements the method of Phipson (2013) based on averaging local false discovery rates across the p-values.
method="mean" is a very simple method based on averaging the p-values. It gives a slightly smaller estimate than 2*mean(p).
method="hist" implements the histogram method of Mosig et al (2001) and Nettleton et al (2006).
method="convest" calls convest, which implements the method of Langaas et al (2005) based on a convex decreasing density estimate.# Test statistics
z <- rnorm(200)
# First 40 are have non-zero means
z[1:40] <- z[1:40]+2
# True pi0
160/200
# Two-sided p-values
p <- 2*pnorm(-abs(z))
# Estimate pi0
propTrueNull(p, method="lfdr")
propTrueNull(p, method="hist")Run the code above in your browser using DataLab