View source: R/seamless_design.R
| exitprob_seamless | R Documentation |
Computes the upper and lower exit probabilities for a phase
2/3 seamless design. In Phase 2, multiple active arms are compared
against a common control arm. If the test statistic for the arm
ranked rankp0 at the end of Phase 2 crosses the
efficacy boundary, the trial stops early for efficacy; if it falls below
the futility boundary, the trial stops early for futility. Otherwise,
the arm is selected to proceed to Phase 3, where it is tested against
the control over multiple looks with upper and optional
lower stopping boundaries.
exitprob_seamless(
M = NA_integer_,
r = 1,
theta = NA_real_,
corr_known = TRUE,
K = NA_integer_,
b = NULL,
a = NULL,
I = NULL,
rankp0 = 1L,
nthreads = 0
)
M |
Number of active treatment arms in Phase 2. |
r |
Randomization ratio of each active arm to the common control in Phase 2. |
theta |
A vector of length |
corr_known |
Logical. If |
K |
Number of sequential looks in Phase 3. |
b |
A vector of efficacy boundaries (length |
a |
An optional vector of futility boundaries (length |
I |
A vector of information levels (length |
rankp0 |
An integer between 1 and |
nthreads |
The number of threads to use (0 leaves the RcppParallel setting unchanged). |
The function assumes a multivariate normal distribution for the Wald
statistics. Among designs that continue beyond the Phase-2 analysis,
the carried-forward arm is the one with rank rankp0 based on the
p-value of the Z-statistic at the end of Phase 2.
Decision Rules:
Phase 2 efficacy stop: reject if the Phase-2 test statistic
for the arm selected at rank rankp0 satisfies
Z_{[rankp0]}(I_0) \ge b_0.
Phase 2 futility stop: stop for futility if the Phase-2 test
statistic for the arm selected at rank rankp0 satisfies
Z_{[rankp0]}(I_0) \le a_0.
Continue to Phase 3: if
a_0 < Z_{[rankp0]}(I_0) < b_0, continue with the arm selected
at rank rankp0 only.
Phase 3 efficacy stop: at look k, reject if the selected
arm's Z-statistic exceeds the efficacy boundary and no earlier stop has
occurred.
Phase 3 futility stop: at look k, stop for futility if
the selected arm's Z-statistic is below the futility boundary and no
earlier stop has occurred.
Design Assumptions:
All active arms share the same information level in Phase 2.
Exactly one active arm is selected at the end of Phase 2 based on the
rankp0-th largest observed Z-statistic when the trial continues
to Phase 3.
A list containing the following components:
exitProbUpper: A vector of length K + 1. The first element
is the probability of stopping for efficacy in Phase 2; the remaining
elements are the probabilities of stopping for efficacy at each look in
Phase 3.
exitProbLower: A vector of length K + 1. The first element
is the probability of stopping for futility in Phase 2; the remaining
elements are the probabilities of stopping for futility at each look in
Phase 3.
exitProbByArmUpper: A (K + 1) \times M matrix. The
(k, m)-th entry gives the probability of stopping for efficacy at
look k given that arm m is selected at rank rankp0.
exitProbByArmLower: A (K + 1) \times M matrix. The
(k, m)-th entry gives the probability of stopping for futility at
look k given that arm m is selected at rank rankp0.
selectionProb: A vector of length M containing the
probability that each active arm is selected at rank rankp0.
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.
# Setup: 2 active arms vs control in Phase 2; 1 selected arm vs control
# in Phase 3. Phase 3 has 2 sequential looks.
# Information levels: equal spacing over 3 looks based on a maximum of
# 110 patients per arm, SD = 1.0
I <- c(110 / (2 * 1.0^2) * seq(1, 3)/3)
# O'Brien-Fleming efficacy boundaries
b <- c(3.776605, 2.670463, 2.180424)
# No futility stopping
p0 <- exitprob_seamless(M = 2, theta = c(0, 0), K = 2,
b = b, I = I, nthreads = 1)
cumsum(p0$exitProbUpper)
# Add futility stopping
a <- c(0, 0.5, b[3])
p1 <- exitprob_seamless(M = 2, theta = c(0.3, 0.5), K = 2,
b = b, a = a, I = I, nthreads = 1)
cbind(
cumulativeEfficacy = cumsum(p1$exitProbUpper),
cumulativeFutility = cumsum(p1$exitProbLower)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.