View source: R/discretePB_fun.R
DPB.DiscreteTestResults | R Documentation |
Apply the [DPB] procedure, with or without computing the critical values, to a set of p-values and their discrete support. A non-adaptive version is available as well. Additionally, the user can choose between exact computation of the Poisson-Binomial distribution or a refined normal approximation.
## S3 method for class 'DiscreteTestResults'
DPB(
test.results,
alpha = 0.05,
zeta = 0.5,
critical.values = FALSE,
exact = TRUE,
select.threshold = 1,
...
)
discrete.PB(test.results, ...)
## Default S3 method:
discrete.PB(
test.results,
pCDFlist,
alpha = 0.05,
zeta = 0.5,
adaptive = TRUE,
critical.values = FALSE,
exact = TRUE,
select.threshold = 1,
pCDFlist.indices = NULL,
...
)
## S3 method for class 'DiscreteTestResults'
discrete.PB(
test.results,
alpha = 0.05,
zeta = 0.5,
adaptive = TRUE,
critical.values = FALSE,
exact = TRUE,
select.threshold = 1,
...
)
test.results |
either a numeric vector with p-values or an R6 object of class |
alpha |
single real number strictly between 0 and 1 specifying the target FDP. |
zeta |
single real number strictly between 0 and 1 specifying the target probability of not exceeding the desired FDP. If |
critical.values |
single boolean indicating whether critical constants are to be computed. |
exact |
single boolean indicating whether to compute the Poisson-Binomial distribution exactly or by normal approximation. |
select.threshold |
single real number strictly between 0 and 1 indicating the largest raw p-value to be considered, i.e. only p-values below this threshold are considered and the procedures are adjusted in order to take this selection effect into account; if |
... |
further arguments to be passed to or from other methods. They are ignored here. |
pCDFlist |
list of the supports of the CDFs of the p-values; each list item must be a numeric vector, which is sorted in increasing order and whose last element equals 1. |
adaptive |
single boolean indicating whether to conduct an adaptive procedure or not. |
pCDFlist.indices |
list of numeric vectors containing the test indices that indicate to which raw p-value each unique support in |
DPB
and NDPB
are wrapper functions for discrete.PB
.
The first one simply passes all its arguments to discrete.PB
with
adaptive = TRUE
and NDPB
does the same with
adaptive = FALSE
.
A FDX
S3 class object whose elements are:
Rejected |
rejected raw |
Indices |
indices of rejected |
Num.rejected |
number of rejections. |
Adjusted |
adjusted |
Critical.values |
critical values (only exists if computations where performed with |
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 |
Data |
list with input data. |
Data$Method |
character string describing the used algorithm, e.g. 'Discrete Lehmann-Romano procedure (step-up)'. |
Data$Raw.pvalues |
all observed raw |
Data$pCDFlist |
list of the |
Data$FDP.threshold |
FDP threshold |
Data$Exceedance.probability |
probability |
Data$Data.name |
the respective variable name(s) of the input data. |
Döhler, S. & Roquain, E. (2020). Controlling False Discovery Exceedance for Heterogeneous Tests. Electronic Journal of Statistics, 14(2), pp. 4244-4272. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/20-EJS1771")}
kernel
, FDX
, continuous.LR()
,
continuous.GR()
, discrete.LR()
,
discrete.GR()
, weighted.LR()
,
weighted.GR()
, weighted.PB()
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 supports with Fisher's exact test
library(DiscreteTests) # for Fisher's exact test
test.results <- fisher_test_pv(df)
raw.pvalues <- test.results$get_pvalues()
pCDFlist <- test.results$get_pvalue_supports()
# DPB (exact) without critical values; using results object
DPB.exact.fast <- discrete.PB(test.results)
summary(DPB.exact.fast)
# DPB (exact) with critical values; using extracted p-values and supports
DPB.exact.crit <- discrete.PB(raw.pvalues, pCDFlist, critical.values = TRUE)
summary(DPB.exact.crit)
# DPB (normal approximation) without critical values; using extracted p-values and supports
DPB.norm.fast <- discrete.PB(raw.pvalues, pCDFlist, exact = FALSE)
summary(DPB.norm.fast)
# DPB (normal approximation) with critical values; using results object
DPB.norm.crit <- discrete.PB(test.results, critical.values = TRUE,
exact = FALSE)
summary(DPB.norm.crit)
# Non-adaptive DPB (exact) without critical values; using results object
NDPB.exact.fast <- discrete.PB(test.results, adaptive = FALSE)
summary(NDPB.exact.fast)
# Non-adaptive DPB (exact) with critical values; using extracted p-values and supports
NDPB.exact.crit <- discrete.PB(raw.pvalues, pCDFlist, adaptive = FALSE,
critical.values = TRUE)
summary(NDPB.exact.crit)
# Non-adaptive DPB (normal approx.) without critical values; using extracted p-values and supports
NDPB.norm.fast <- discrete.PB(raw.pvalues, pCDFlist, adaptive = FALSE,
exact = FALSE)
summary(NDPB.norm.fast)
# Non-adaptive DPB (normal approx.) with critical values; using results object
NDPB.norm.crit <- discrete.PB(test.results, adaptive = FALSE,
critical.values = TRUE, exact = FALSE)
summary(NDPB.norm.crit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.