View source: R/weightedLR_fun.R
weighted.LR | R Documentation |
Apply the weighted [wLR] procedure, with or without computing the critical values, to a set of p-values. Both arithmetic and geometric weighting are available.
weighted.LR(
test.results,
weights = NULL,
alpha = 0.05,
zeta = 0.5,
weighting.method = c("AM", "GM"),
critical.values = FALSE,
select.threshold = 1
)
wLR.AM(
test.results,
weights,
alpha = 0.05,
zeta = 0.5,
critical.values = FALSE,
select.threshold = 1
)
wLR.GM(
test.results,
weights,
alpha = 0.05,
zeta = 0.5,
critical.values = FALSE,
select.threshold = 1
)
test.results |
either a numeric vector with p-values or an R6 object of class |
weights |
numeric vector that contains the weights for the p-values. |
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 |
weighting.method |
single character string specifying whether to conduct arithmetic ( |
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 |
wLR.AM
and wLR.GM
are wrapper functions for weighted.LR
.
The first one simply passes all its arguments to weighted.LR
with
weighting.method = "AM"
and wLR.GM
does the same with
weighting.method = "GM"
.
A FDX
S3 class object whose elements are:
Rejected |
rejected raw |
Indices |
indices of rejected |
Num.rejected |
number of rejections. |
Weighted |
weighted |
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$Weights |
the weights for the raw |
Data$FDP.threshold |
FDP threshold |
Data$Exceedance.probability |
probability |
Data$Weighting |
character string describing the weighting method. |
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()
, discrete.PB()
,
weighted.GR()
, weighted.PB()
# Construction of the p-values and their supports for weighted methods
raw.pvalues.weighted <- c(0.7389727, 0.1882310, 0.1302457, 0.9513677,
0.7592122, 0.0100559, 0.0000027, 0.1651034)
weights <- c(0.7947122, 1.2633867, 2.8097858, 2.2112801,
2.3878654, 1.2389620, 2.3878654, 0.7947122)
# arithmetic-weighted Lehmann-Romano procedure without critical values
wLR.AM.fast <- wLR.AM(raw.pvalues.weighted, weights)
summary(wLR.AM.fast)
# arithmetic-weighted Lehmann-Romano procedure with critical values
wLR.AM.crit <- wLR.AM(raw.pvalues.weighted, weights, critical.values = TRUE)
summary(wLR.AM.crit)
# geometric-weighted Lehmann-Romano procedure without critical values
wLR.GM.fast <- wLR.GM(raw.pvalues.weighted, weights)
summary(wLR.GM.fast)
# geometric-weighted Lehmann-Romano procedure with critical values
wLR.GM.crit <- wLR.GM(raw.pvalues.weighted, weights, critical.values = TRUE)
summary(wLR.GM.crit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.