Learn R Programming

FDX (version 1.0.2)

discrete.LR: Discrete Lehmann-Romano procedure

Description

Apply the [DLR] procedure, with or without computing the critical values, to a set of p-values and their discrete support. Both step-down and step-up procedures can be computed and non-adaptive versions are available as well.

Usage

discrete.LR(
  raw.pvalues,
  pCDFlist,
  alpha = 0.05,
  zeta = 0.5,
  direction = "sd",
  adaptive = TRUE,
  critical.values = FALSE
)

DLR( raw.pvalues, pCDFlist, alpha = 0.05, zeta = 0.5, direction = "sd", critical.values = FALSE )

NDLR( raw.pvalues, pCDFlist, alpha = 0.05, zeta = 0.5, direction = "sd", critical.values = 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 FDP, a number strictly between 0 and 1. For *.fast kernels, it is only necessary, if stepUp = TRUE.

zeta

the target probability of not exceeding the desired FDP, a number strictly between 0 and 1. If zeta=NULL (the default), then zeta is chosen equal to alpha.

direction

a character string specifying whether to conduct a step-up (direction="su", the default) or step-down procedure (direction="sd").

adaptive

a boolean specifying whether to conduct an adaptive procedure or not.

critical.values

a boolean. If TRUE, critical constants are computed and returned (this is computationally intensive).

Value

A FDX 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.values

Critical values (if requested).

Method

A character string describing the used algorithm, e.g. 'Discrete Lehmann-Romano procedure (step-up)'.

FDP.threshold

FDP threshold alpha.

Exceedance.probability

Probability zeta of FDP exceeding alpha; thus, FDP is being controlled at level alpha with confidence 1 - zeta.

Data$raw.pvalues

The values of raw.pvalues.

Data$pCDFlist

The values of pCDFlist.

Data$data.name

The respective variable names of raw.pvalues and pCDFlist.

Details

DLR and NDLR are wrapper functions for discrete.LR. The first one simply passes all its parameters to discrete.LR with adaptive = TRUE and NDLR does the same with adaptive = FALSE.

References

S. D<U+00F6>hler and E. Roquain (2019). Controlling False Discovery Exceedance for Heterogeneous Tests. arXiv:1912.04607v1.

See Also

kernel, FDX-package, continuous.LR, continuous.GR, discrete.GR, discrete.PB, weighted.LR, weighted.GR, weighted.PB

Examples

Run this code
# NOT RUN {
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 (fisher.pvalues.support
# is from 'DiscreteFDR' package!)
df.formatted <- fisher.pvalues.support(counts = df, input = "noassoc")
raw.pvalues <- df.formatted$raw
pCDFlist <- df.formatted$support

DLR.sd.fast <- DLR(raw.pvalues, pCDFlist)
summary(DLR.sd.fast)
DLR.su.fast <- DLR(raw.pvalues, pCDFlist, direction = "su")
summary(DLR.su.fast)

DLR.sd.crit <- DLR(raw.pvalues, pCDFlist, critical.values = TRUE)
summary(DLR.sd.crit)
DLR.su.crit <- DLR(raw.pvalues, pCDFlist, direction = "su", critical.values = TRUE)
summary(DLR.su.crit)

NDLR.sd.fast <- NDLR(raw.pvalues, pCDFlist)
summary(NDLR.sd.fast)
NDLR.su.fast <- NDLR(raw.pvalues, pCDFlist, direction = "su")
summary(NDLR.su.fast)

NDLR.sd.crit <- NDLR(raw.pvalues, pCDFlist, critical.values = TRUE)
summary(NDLR.sd.crit)
NDLR.su.crit <- NDLR(raw.pvalues, pCDFlist, direction = "su", critical.values = TRUE)
summary(NDLR.su.crit)

# }

Run the code above in your browser using DataLab