fseqbon: Group Sequential Trials Using Bonferroni-Based Graphical...

View source: R/wrappers.R

fseqbonR Documentation

Group Sequential Trials Using Bonferroni-Based Graphical Approaches

Description

Obtains the test results for group sequential trials using graphical approaches based on weighted Bonferroni tests.

Usage

fseqbon(
  w,
  G,
  alpha = 0.025,
  kMax,
  typeAlphaSpending = NULL,
  parameterAlphaSpending = NULL,
  incidenceMatrix = NULL,
  maxInformation = NULL,
  p,
  information,
  spendingTime = NULL
)

Arguments

w

The vector of initial weights for elementary hypotheses.

G

The initial transition matrix.

alpha

The significance level. Defaults to 0.025.

kMax

The maximum number of stages.

typeAlphaSpending

The vector of alpha spending functions. Each element is one of the following: "OF" for O'Brien-Fleming boundaries, "P" for Pocock boundaries, "WT" for Wang & Tsiatis boundaries, "sfOF" for O'Brien-Fleming type spending function, "sfP" for Pocock type spending function, "sfKD" for Kim & DeMets spending function, "sfHSD" for Hwang, Shi & DeCani spending function, and "none" for no early efficacy stopping. Defaults to "sfOF" if not provided.

parameterAlphaSpending

The vector of parameter values for the alpha spending functions. Each element corresponds to the value of Delta for "WT", rho for "sfKD", or gamma for "sfHSD". Defaults to missing if not provided.

incidenceMatrix

The incidence matrix indicating whether the specific hypothesis will be tested at the given look. The number of columns of incidenceMatrix must be equal to the maximum number of study looks (kMax). If not provided, defaults to testing each hypothesis at all study looks.

maxInformation

The vector of target maximum information for each hypothesis. Defaults to a vector of 1s if not provided.

p

The matrix of raw p-values for each hypothesis by study look.

information

The matrix of observed information for each hypothesis by study look.

spendingTime

The spending time for alpha spending by study look. If not provided, it is the same as informationRates calculated from information and maxInformation.

Value

A vector to indicate the first look the specific hypothesis is rejected (0 if the hypothesis is not rejected).

Author(s)

Kaifeng Lu, kaifenglu@gmail.com

References

Willi Maurer and Frank Bretz. Multiple testing in group sequential trials using graphical approaches. Statistics in Biopharmaceutical Research. 2013; 5:311-320.

Examples


# Case study from Maurer & Bretz (2013)

fseqbon(
  w = c(0.5, 0.5, 0, 0),
  G = matrix(c(0, 0.5, 0.5, 0,  0.5, 0, 0, 0.5,
               0, 1, 0, 0,  1, 0, 0, 0),
             nrow=4, ncol=4, byrow=TRUE),
  alpha = 0.025,
  kMax = 3,
  typeAlphaSpending = rep("sfOF", 4),
  maxInformation = rep(1, 4),
  p = matrix(c(0.0062, 0.017, 0.009, 0.13,
               0.0002, 0.0035, 0.002, 0.06),
             nrow=4, ncol=2),
  information = matrix(c(rep(1/3, 4), rep(2/3, 4)),
                       nrow=4, ncol=2))



lrstat documentation built on Oct. 18, 2024, 9:06 a.m.