Skip to contents

Native estimators. "storey" is Storey and Tibshirani (2003): a cubic smoothing spline with 3 df (stats::smooth.spline) through \(\hat\pi_0(\lambda)\) over seq(0.05, 0.95, 0.05), read at the largest lambda; "bootstrap" is the Storey-Taylor-Siegmund (2004) MSE-minimising lambda. Both reproduce qvalue::pi0est (pi0.method = "smoother" / "bootstrap"). "two_step" is the Benjamini-Krieger-Yekutieli (2006) stage-one estimator.

Usage

estimate_pi0(p_values, method = c("storey", "bootstrap", "two_step"))

Arguments

p_values

Numeric vector of raw p-values.

method

One of "storey", "bootstrap", or "two_step".

Value

A scalar pi0 estimate in [0, 1].

Examples

set.seed(1)
p <- c(runif(80), runif(20, 0, 0.005))
estimate_pi0(p, method = "storey")
#> [1] 0.6053452