get.pi0 | R Documentation |
This function estimates the null proportion of data or pi0 value.
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 )
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. |
We run into errors or warnings when pvalues, zvalues, threshold or default.odds are not inputted correctly.
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 |
Rpack:bibtexRdpack
\insertRefRFDRestimation
\insertRefstorey:2003FDRestimation
\insertRefmein:2006FDRestimation
\insertRefjiang:2008FDRestimation
\insertRefnett:2006FDRestimation
\insertRefpounds:2003FDRestimation
\insertRefmurray2020falseFDRestimation
plot.p.fdr, p.fdr, summary.p.fdr
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.