fCERStageBound: Compute stage-wise bounds for multiple testing

View source: R/adaptive_two_stage.R

fCERStageBoundR Documentation

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
)

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

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.

Author(s)

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

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)


lrstat documentation built on Aug. 25, 2026, 5:07 p.m.