discrete.BH {DiscreteFDR} | R Documentation |
[HSU], [HSD], [AHSU] and [AHSD] procedures
Description
Apply the [HSU], [HSD], [AHSU] and [AHSD] procedures, with or without computing the critical constants, to a set of p-values and their discrete support.
Usage
discrete.BH(
raw.pvalues,
pCDFlist,
alpha = 0.05,
direction = "su",
adaptive = FALSE,
ret.crit.consts = FALSE
)
DBH(
raw.pvalues,
pCDFlist,
alpha = 0.05,
direction = "su",
ret.crit.consts = FALSE
)
ADBH(
raw.pvalues,
pCDFlist,
alpha = 0.05,
direction = "su",
ret.crit.consts = FALSE
)
Arguments
raw.pvalues |
vector of the raw observed p-values, as provided by the end user and before matching with their nearest neighbor in the CDFs supports. |
pCDFlist |
a list of the supports of the CDFs of the p-values. Each support is represented by a vector that must be in increasing order. |
alpha |
the target FDR level, a number strictly between 0 and 1. |
direction |
a character string specifying whether to conduct a step-up ( |
adaptive |
a boolean specifying whether to conduct an adaptive procedure or not. |
ret.crit.consts |
a boolean. If |
Details
DBH
and ADBH
are wrapper functions for discrete.BH
. DBH
simply passes
all its parameters to discrete.BH
with adaptive = FALSE
. ADBH
does the
same with adaptive = TRUE
.
Value
A DiscreteFDR
S3 class object whose elements are:
Rejected |
Rejected raw p-values |
Indices |
Indices of rejected hypotheses |
Num.rejected |
Number of rejections |
Adjusted |
Adjusted p-values (only for step-down direction). |
Critical.constants |
Critical constants (if requested) |
Method |
Character string describing the used algorithm, e.g. 'Discrete Benjamini-Hochberg procedure (step-up)' |
Signif.level |
Significance level |
Data$raw.pvalues |
The values of |
Data$pCDFlist |
The values of |
Data$data.name |
The respective variable names of |
References
Döhler, S., Durand, G., & Roquain, E. (2018). New FDR bounds for discrete and heterogeneous tests. Electronic Journal of Statistics, 12(1), pp. 1867-1900. doi:10.1214/18-EJS1441
See Also
Examples
X1 <- c(4, 2, 2, 14, 6, 9, 4, 0, 1)
X2 <- c(0, 0, 1, 3, 2, 1, 2, 2, 2)
N1 <- rep(148, 9)
N2 <- rep(132, 9)
Y1 <- N1 - X1
Y2 <- N2 - X2
df <- data.frame(X1, Y1, X2, Y2)
df
#Construction of the p-values and their support
df.formatted <- fisher.pvalues.support(counts = df, input = "noassoc")
raw.pvalues <- df.formatted$raw
pCDFlist <- df.formatted$support
DBH.su.fast <- DBH(raw.pvalues, pCDFlist)
summary(DBH.su.fast)
DBH.sd.fast <- DBH(raw.pvalues, pCDFlist, direction = "sd")
DBH.sd.fast$Adjusted
summary(DBH.sd.fast)
DBH.su.crit <- DBH(raw.pvalues, pCDFlist, ret.crit.consts = TRUE)
summary(DBH.su.crit)
DBH.sd.crit <- DBH(raw.pvalues, pCDFlist, direction = "sd",
ret.crit.consts = TRUE)
DBH.sd.crit$Adjusted
summary(DBH.sd.crit)
ADBH.su.fast <- ADBH(raw.pvalues, pCDFlist)
summary(ADBH.su.fast)
ADBH.sd.fast <- ADBH(raw.pvalues, pCDFlist, direction = "sd")
ADBH.sd.fast$Adjusted
summary(ADBH.sd.fast)
ADBH.su.crit <- ADBH(raw.pvalues, pCDFlist, ret.crit.consts = TRUE)
summary(ADBH.su.crit)
ADBH.sd.crit <- ADBH(raw.pvalues, pCDFlist, direction = "sd",
ret.crit.consts = TRUE)
ADBH.sd.crit$Adjusted
summary(ADBH.sd.crit)