| getDesign_seamless | R Documentation |
Computes either the maximum information and stopping boundaries for a phase 2/3 seamless design, or the achieved power when the maximum information and stopping boundaries are provided. Both efficacy and futility stopping can be incorporated.
getDesign_seamless(
beta = NA_real_,
IMax = NA_real_,
theta = NA_real_,
M = NA_integer_,
r = 1,
corr_known = TRUE,
K = 1L,
informationRates = NA_real_,
efficacyStopping = NA_integer_,
futilityStopping = NA_integer_,
criticalValues = NULL,
alpha = 0.025,
typeAlphaSpending = "sfOF",
parameterAlphaSpending = NA_real_,
userAlphaSpending = NA_real_,
futilityBounds = NULL,
futilityCP = NULL,
futilityTheta = NULL,
typeBetaSpending = "none",
parameterBetaSpending = NA_real_,
userBetaSpending = NA_real_,
spendingTime = NA_real_
)
beta |
Type II error rate. Provide either |
IMax |
Maximum information for any active arm versus the common
control. Provide either |
theta |
A vector of length |
M |
Number of active treatment arms in Phase 2. |
r |
Randomization ratio of each active arm to the common control in Phase 2. |
corr_known |
Logical. If |
K |
Number of sequential looks in Phase 3. |
informationRates |
A numeric vector of information rates fixed
before the trial. If unspecified, defaults to |
efficacyStopping |
Indicators of whether efficacy stopping is allowed
at each stage. Defaults to |
futilityStopping |
Indicators of whether futility stopping is allowed
at each stage. Defaults to |
criticalValues |
The upper boundaries on the max-Z statistic scale for Phase 2 and the Z statistics for the selected arm in Phase 3. If missing, boundaries will be computed based on the specified alpha spending function. |
alpha |
The significance level. Defaults to 0.025. |
typeAlphaSpending |
The type of alpha spending. One of the following:
|
parameterAlphaSpending |
The parameter value for the alpha spending.
Corresponds to |
userAlphaSpending |
The user defined alpha spending. Cumulative alpha spent up to each stage. |
futilityBounds |
A numeric vector of length |
futilityCP |
A numeric vector of length |
futilityTheta |
A numeric vector of length |
typeBetaSpending |
The type of beta spending. One of the following:
|
parameterBetaSpending |
The parameter value for the beta spending.
Corresponds to |
userBetaSpending |
The user defined beta spending. Cumulative beta spent up to each stage. |
spendingTime |
A numeric vector of length |
If corr_known is FALSE, critical boundaries are
computed assuming independence among the Phase-2 Wald statistics
(a conservative assumption). Power calculations, however, use the
correlation implied by the randomization ratio r.
Futility boundaries may be supplied directly on the Z scale, derived from conditional power, derived from parameter values, or computed from a beta spending function.
An S3 object of class seamless with the following components:
overallResults: A data frame containing:
overallReject: Overall probability of rejecting the null
hypothesis.
alpha: Overall significance level.
attainedAlpha: The attained significance level, which may
differ from alpha in the presence of futility stopping.
M: Number of active arms in Phase 2.
r: Randomization ratio per active arm versus control in
Phase 2.
corr_known: Whether the phase-2 correlation was assumed known.
K: Number of looks in Phase 3.
information: Maximum information for any active arm versus
control.
expectedInformationH1: Expected information under the
alternative.
expectedInformationH0: Expected information under the null.
informationOverall: Maximum information for the overall study.
expectedInformationH1: Expected information under the
alternative for the overall study.
expectedInformationH0: Expected information under the null
for the overall study.
byStageResults: A data frame containing:
informationRates: Information rates at each analysis.
efficacyBounds: Efficacy boundaries on the Z scale.
futilityBounds: Futility boundaries on the Z scale.
rejectPerStage: Probability of efficacy stopping at each stage.
futilityPerStage: Probability of futility stopping at each
stage.
cumulativeRejection: Cumulative probability of efficacy
stopping.
cumulativeFutility: Cumulative probability of futility
stopping.
cumulativeAlphaSpent: Cumulative alpha spent.
efficacyTheta: Efficacy boundaries on the parameter scale.
futilityTheta: Futility boundaries on the parameter scale.
efficacyP: Efficacy boundaries on the p-value scale.
futilityP: Futility boundaries on the p-value scale.
information: Cumulative information at each analysis.
informationOverall: Cumulative information for the overall
study at each analysis.
efficacyStopping: Indicator of whether efficacy stopping is
permitted.
futilityStopping: Indicator of whether futility stopping is
permitted.
rejectPerStageH0: Probability of efficacy stopping under the
global null.
futilityPerStageH0: Probability of futility stopping under the
global null.
cumulativeRejectionH0: Cumulative probability of efficacy
stopping under the global null.
cumulativeFutilityH0: Cumulative probability of futility
stopping under the global null.
byArmResults: A data frame containing:
theta: Parameter values for the active arms.
selectAsBest: Probability an arm is selected as best at the
end of Phase 2.
powerByArm: Probability of rejecting the null for each arm by
trial end.
condPowerByArm: Conditional power for each arm given it was
selected as the best at the end of Phase 2.
settings: A list of input settings:
typeAlphaSpending: Type of alpha spending function.
parameterAlphaSpending: Parameter value for the chosen alpha
spending function.
userAlphaSpending: User-specified alpha spending values.
typeBetaSpending: Type of beta spending function.
parameterBetaSpending: Parameter value for the chosen beta
spending function.
userBetaSpending: User-specified beta spending values.
spendingTime: Error-spending times at each analysis.
Kaifeng Lu, kaifenglu@gmail.com
Ping Gao, Yingqiu Li. Adaptive two-stage seamless sequential design for clinical trials. Journal of Biopharmaceutical Statistics, 2025, 35(4), 565-587.
# Example 1: obtain the maximum information given power with no futility
(design1 <- getDesign_seamless(
beta = 0.1, theta = c(0.3, 0.5), M = 2, r = 1.0,
K = 2, informationRates = seq(1, 3)/3,
alpha = 0.025, typeAlphaSpending = "OF"))
# Example 2: obtain power given the maximum information and a futility rule
(design2 <- getDesign_seamless(
IMax = 110/(2*1^2), theta = c(0.3, 0.5), M = 2, r = 1.0,
K = 2, informationRates = seq(1, 3)/3,
alpha = 0.025, typeAlphaSpending = "OF",
futilityBounds = c(0.0, 0.5)))
# Example 3: derive futility boundaries using beta spending
(design3 <- getDesign_seamless(
beta = 0.1, theta = c(-log(0.5), -log(0.7)),
M = 2, r = 1.0, corr_known = FALSE,
K = 2, informationRates = seq(1, 3)/3,
alpha = 0.025, typeAlphaSpending = "sfOF",
typeBetaSpending = "sfHSD", parameterBetaSpending = -2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.