getSecondStageInformation: Calculate the Second-stage Information

View source: R/getSecondStageInformation.R

getSecondStageInformationR Documentation

Calculate the Second-stage Information

Description

Calculate second-stage information for given first-stage p-value and design.

Usage

getSecondStageInformation(firstStagePValue, design)

Arguments

firstStagePValue

First-stage p-value or p-values. Must be a numeric vector between 0 and 1.

design

An object of class TrialDesignOptimalConditionalError created by getDesignOptimalConditionalErrorFunction(). Contains all necessary arguments to calculate the optimal conditional error function for the specified case.

Details

The second-stage information I_{2} is calculated given a first-stage p-value p_1 as:

I_{2}(p_1) = \frac{(\Phi^{-1}(1-\alpha_2(p_1)) + \Phi^{-1}(CP))^2}{\Delta_1^2} = \frac{\nu(\alpha_2(p_1))}{\Delta_1^2},

where

  • \alpha_2(p_1) is the conditional error function

  • CP is the target conditional power

  • \Delta_1 is the assumed treatment effect (expressed as a mean difference).

The conditional error is calculated according to the specification provided in the design argument. For p-values smaller or equal to the first-stage efficacy boundary as well as p-values greater than the first-stage futility boundary, the returned information is 0 (since the trial is ended early in both cases).

Value

The second-stage information.

References

Brannath, W. & Bauer, P. (2004). Optimal conditional error functions for the control of conditional power. Biometrics. https://www.jstor.org/stable/3695393

See Also

getDesignOptimalConditionalErrorFunction(), getExpectedSecondStageInformation(), getOptimalConditionalError()

Examples

design <- getDesignOptimalConditionalErrorFunction(
  alpha = 0.025, alpha1 = 0.001, alpha0 = 0.5,
  conditionalPower = 0.9, delta1 = 0.25, useInterimEstimate = FALSE,
  firstStageInformation = 40, likelihoodRatioDistribution = "maxlr"
)

getSecondStageInformation(
  firstStagePValue = c(0.05, 0.1, 0.2), design = design
)


optconerrf documentation built on Sept. 9, 2025, 5:29 p.m.