DLR | R Documentation |
DLR()
is a wrapper function of discrete.LR()
for computing [DLR]. It
simply passes its arguments to discrete.LR()
with fixed
adaptive = TRUE
.
DLR(test.results, ...)
## Default S3 method:
DLR(
test.results,
pCDFlist,
alpha = 0.05,
zeta = 0.5,
direction = "sd",
critical.values = FALSE,
select.threshold = 1,
pCDFlist.indices = NULL,
...
)
## S3 method for class 'DiscreteTestResults'
DLR(
test.results,
alpha = 0.05,
zeta = 0.5,
direction = "sd",
critical.values = FALSE,
select.threshold = 1,
...
)
test.results |
either a numeric vector with p-values or an R6 object of class |
... |
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. |
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 |
direction |
single character string specifying whether to perform the step-up ( |
critical.values |
single boolean indicating whether critical constants are to be computed. |
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 |
pCDFlist.indices |
list of numeric vectors containing the test indices that indicate to which raw p-value each unique support in |
Computing critical constants (critical.values = 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 area in a plot or other theoretical
reasons.
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$Adaptive |
boolean indicating whether an adaptive procedure was conducted or not. |
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")}
discrete.LR()
, NDLR()
, discrete.GR()
, DGR()
, NDGR()
,
discrete.PB()
, DPB()
, NDPB()
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()
# DLR without critical values; using results object
DLR.sd.fast <- DLR(test.results)
summary(DLR.sd.fast)
# DLR with critical values; using extracted p-values and supports
DLR.sd.crit <- DLR(raw.pvalues, pCDFlist, critical.values = TRUE)
summary(DLR.sd.crit)
# DLR (step-up) without critical values; using extracted p-values and supports
DLR.su.fast <- DLR(raw.pvalues, pCDFlist, direction = "su")
summary(DLR.su.fast)
# DLR (step-up) with critical values; using test results object
DLR.su.crit <- DLR(test.results, direction = "su", critical.values = TRUE)
summary(DLR.su.crit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.