DBH | R Documentation |
DBH()
is a wrapper function of discrete.BH()
for computing [HSU] and
[HSD]. It simply passes its arguments to discrete.BH()
with fixed
adaptive = FALSE
.
DBH(test.results, ...)
## Default S3 method:
DBH(
test.results,
pCDFlist,
alpha = 0.05,
direction = "su",
ret.crit.consts = FALSE,
select.threshold = 1,
pCDFlist.indices = NULL,
...
)
## S3 method for class 'DiscreteTestResults'
DBH(
test.results,
alpha = 0.05,
direction = "su",
ret.crit.consts = FALSE,
select.threshold = 1,
...
)
test.results |
either a numeric vector with |
... |
further arguments to be passed to or from other methods. They are ignored here. |
pCDFlist |
list of the supports of the CDFs of the |
alpha |
single real number strictly between 0 and 1 indicating the target FDR level. |
direction |
single character string specifying whether to perform a step-up ( |
ret.crit.consts |
single boolean specifying whether critical constants are to be computed. |
select.threshold |
single real number strictly between 0 and 1 indicating the largest raw |
pCDFlist.indices |
list of numeric vectors containing the test indices that indicate to which raw |
Computing critical constants (ret.crit.consts = TRUE
) requires considerably
more execution time, especially if the number of unique supports is large.
We recommend that users should only have them calculated when they need them,
e.g. for illustrating the rejection set in a plot or other theoretical
reasons.
A DiscreteFDR
S3 class object whose elements are:
Rejected |
rejected raw |
Indices |
indices of rejected hypotheses. |
Num.rejected |
number of rejections. |
Adjusted |
adjusted |
Critical.constants |
critical values (only exists if computations where performed with |
Data |
list with input data. |
Data$Method |
character string describing the used algorithm, e.g. 'Discrete Benjamini-Hochberg procedure (step-up)' |
Data$Raw.pvalues |
observed |
Data$pCDFlist |
list of the |
Data$FDR.level |
FDR level |
Data$Data.name |
the respective variable names of the input data. |
Select |
list with data related to |
Select$Threshold |
|
Select$Effective.Thresholds |
results of each |
Select$Pvalues |
selected |
Select$Indices |
indices of |
Select$Scaled |
scaled selected |
Select$Number |
number of selected |
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/18-EJS1441")}
discrete.BH()
, ADBH()
, DBR()
, DBY()
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
# Compute p-values and their supports of Fisher's exact test
test.result <- generate.pvalues(df, "fisher")
raw.pvalues <- test.result$get_pvalues()
pCDFlist <- test.result$get_pvalue_supports()
# DBH (step-up) without critical values; using test results object
DBH.su.fast <- DBH(test.result)
summary(DBH.su.fast)
# DBH (step-down) without critical values; using extracted p-values
# and supports
DBH.sd.fast <- DBH(raw.pvalues, pCDFlist, direction = "sd")
summary(DBH.sd.fast)
# DBH (step-up) with critical values; using extracted p-values and supports
DBH.su.crit <- DBH(raw.pvalues, pCDFlist, ret.crit.consts = TRUE)
summary(DBH.su.crit)
# DBH (step-down) with critical values; using test results object
DBH.sd.crit <- DBH(test.result, direction = "sd", ret.crit.consts = TRUE)
summary(DBH.sd.crit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.