get.pi0 {FDRestimation} | R Documentation |
pi0 Estimation
Description
This function estimates the null proportion of data or pi0 value.
Usage
get.pi0(
pvalues,
set.pi0 = 1,
zvalues = "two.sided",
estim.method = "last.hist",
threshold = 0.05,
default.odds = 1,
hist.breaks = "scott",
na.rm = TRUE
)
Arguments
pvalues |
A numeric vector of raw p-values. |
set.pi0 |
A numeric value to specify a known or assumed pi0 value in the interval |
zvalues |
A numeric vector of z-values to be used in pi0 estimation or a string with options "two.sided", "greater" or "less". Defaults to "two.sided". |
estim.method |
A string used to determine which method is used to estimate the pi0 value. Defaults to "last.hist". |
threshold |
A numeric value in the interval |
default.odds |
A numeric value determining the ratio of pi1/pi0 used in the computation of lower bound FDR. Defaults to 1. |
hist.breaks |
A numeric or string variable representing how many breaks in the pi0 estimation histogram methods. Defaults to "scott". |
na.rm |
A Boolean TRUE or FALSE value indicating whether NA's should be removed from the inputted raw p-value vector before further computation. Defaults to TRUE. |
Details
We run into errors or warnings when pvalues, zvalues, threshold or default.odds are not inputted correctly.
Value
An estimated null proportion:
pi0 |
A numeric value representing the proportion of the given data that come from the null distribution. A value in the interval |
References
Romain Francois (2014). bibtex: bibtex parser. R package version 0.4.0.
R Core Team (2016). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, https://www.R-project.org/.
Storey JD, Tibshirani R (2003). “Statistical significance for genomewide studies.” Proceedings of the National Academy of Sciences, 100(16), 9440–9445.
Meinshausen N, Rice J, others (2006). “Estimating the proportion of false null hypotheses among a large number of independently tested hypotheses.” The Annals of Statistics, 34(1), 373–393.
Jiang H, Doerge RW (2008). “Estimating the proportion of true null hypotheses for multiple comparisons.” Cancer informatics, 6, 117693510800600001.
Nettleton D, Hwang JG, Caldo RA, Wise RP (2006). “Estimating the number of true null hypotheses from a histogram of p values.” Journal of agricultural, biological, and environmental statistics, 11(3), 337.
Pounds S, Morris SW (2003). “Estimating the occurrence of false positives and false negatives in microarray studies by approximating and partitioning the empirical distribution of p-values.” Bioinformatics, 19(10), 1236–1242.
Murray MH, Blume JD (2020). “False Discovery Rate Computation: Illustrations and Modifications.” 2010.04680.
See Also
plot.p.fdr, p.fdr, summary.p.fdr
Examples
# Example 1
pi0 = 0.8
pi1 = 1-pi0
n = 10000
n.0 = ceiling(n*pi0)
n.1 = n-n.0
sim.data = c(rnorm(n.1,3,1),rnorm(n.0,0,1))
sim.data.p = 2*pnorm(-abs(sim.data))
get.pi0(sim.data.p, estim.method = "last.hist")
get.pi0(sim.data.p, estim.method = "storey")
get.pi0(sim.data.p, estim.method = "set.pi0")