Learn R Programming

lrstat (version 0.3.3)

fCERStageBound: Compute stage-wise bounds for multiple testing

Description

Compute stage-wise bounds for a two-stage multiple testing procedure.

Usage

fCERStageBound(
  wgtmat,
  family = NULL,
  corr = NULL,
  alpha,
  alpha1,
  info_frac,
  nthreads = 0
)

Value

A list containing:

  • inthyp: The indicator matrix of the intersection hypotheses.

  • stg1_coef: The stage 1 coefficient for each intersection hypothesis.

  • stg2_coef: The stage 2 coefficient for each intersection hypothesis.

  • stg1_bnd: The stage 1 bounds for the elementary hypotheses in each intersection hypothesis.

  • stg2_bnd: The stage 2 bounds for the elementary hypotheses in each intersection hypothesis.

Arguments

wgtmat

Weight matrix for the intersection hypotheses

family

Family matrix indicating which hypotheses belong to which families. The correlation is known only for hypotheses belonging to the same family. If NULL, all hypotheses are assumed to belong to the same family.

corr

Correlation matrix for the test statistics

alpha

Overall significance level

alpha1

Significance level for the first stage

info_frac

Information fraction for the first stage

nthreads

The number of threads to use in simulations (0 means the default RcppParallel behavior).

Author

Kaifeng Lu, kaifenglu@gmail.com

References

Cyrus Mehta, Ajoy Mukhopadhyay, and Martin Posch. Graph Based, Adaptive, Multiarm, Multiple Endpoint, Two-Stage Designs. Statistics in Medicine. 2025.

Examples

Run this code
initial_weights <- c(0.5, 0.5, 0, 0)
transition_matrix <- matrix(c(0, 0.5, 0.5, 0,
                              0.5, 0, 0, 0.5,
                              0, 1, 0, 0,
                              1, 0, 0, 0),
                            nrow = 4, byrow = TRUE)
wgtmat <- fwgtmat(initial_weights, transition_matrix)
family <- matrix(c(1, 1, 0, 0,
                   0, 0, 1, 1),
                 nrow = 2, byrow = TRUE)
corr <- matrix(c(1, 0.5, NA, NA,
                 0.5, 1, NA, NA,
                 NA, NA, 1, 0.5,
                 NA, NA, 0.5, 1),
               nrow = 4, byrow = TRUE)
alpha <- 0.025
alpha1 <- errorSpent(0.5, alpha, "sfOF")
fCERStageBound(wgtmat, family, corr, alpha,
               alpha1, info_frac = 0.5, nthreads = 1)

Run the code above in your browser using DataLab