View source: R/getSecondStageInformation.R
getSecondStageInformation | R Documentation |
Calculate second-stage information for given first-stage p-value and design.
getSecondStageInformation(firstStagePValue, design)
firstStagePValue |
First-stage p-value or p-values. Must be a numeric vector between 0 and 1. |
design |
An object of class |
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).
The second-stage information.
Brannath, W. & Bauer, P. (2004). Optimal conditional error functions for the control of conditional power. Biometrics. https://www.jstor.org/stable/3695393
getDesignOptimalConditionalErrorFunction()
, getExpectedSecondStageInformation()
, getOptimalConditionalError()
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
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.