continuous.GR: Continuous Guo-Romano procedure

View source: R/continuousGR.R

continuous.GRR Documentation

Continuous Guo-Romano procedure

Description

Apply the usual continuous [GR] procedure, with or without computing the critical values, to a set of p-values. A non-adaptive version is available as well.

Usage

continuous.GR(
  raw.pvalues,
  alpha = 0.05,
  zeta = 0.5,
  adaptive = TRUE,
  critical.values = FALSE
)

GR(raw.pvalues, alpha = 0.05, zeta = 0.5, critical.values = FALSE)

NGR(raw.pvalues, alpha = 0.05, zeta = 0.5, 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.

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.

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).

Details

GR and NGR are wrapper functions for continuous.GR. The first one simply passes all its parameters to continuous.GR with adaptive = TRUE and NGR does the same with adaptive = FALSE.

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.

Adaptive

A boolean specifying whether an adaptive procedure was conducted or not.

Data$raw.pvalues

The values of raw.pvalues.

Data$data.name

The respective variable names of raw.pvalues and pCDFlist.

See Also

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

Examples

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

GR.fast <- GR(raw.pvalues)
summary(GR.fast)

GR.crit <- GR(raw.pvalues, critical.values = TRUE)
summary(GR.crit)

NGR.fast <- NGR(raw.pvalues)
summary(NGR.fast)

NGR.crit <- NGR(raw.pvalues, critical.values = TRUE)
summary(NGR.crit)


FDX documentation built on Oct. 18, 2022, 9:09 a.m.