Calculate Operating characteristics of Posterior Probability method with Beta Prior on the Control or Standard of Care Arm
Source:R/ocPostprobDist.R
ocPostprobDist.Rd
Arguments
- nnE
(
numeric
):
sample size or sizes where study can be stopped for Efficacy decision. If different for Futility decision, specify innnF
.- truep
(
number
):
assumed true response rate.- deltaE
(
number
):
margin of which the response rate in the treatment group should be better than in the standard of care ofgroup
. Delta for Efficacy is used to calculateP(truep > P_S + deltaE)
which should exceed thresholdtU
to to stop for Efficacy.DeltaE
can also be negative in non-inferiority setting. See also note.- deltaF
(
number
):
margin of which the response rate in the treatment group should be better than in the standard of care ofgroup
. Delta for Futility is used to calculateP(truep > P_S - deltaF)
which should exceed thresholdtL
to stop for Futility.DeltaF
can also be negative in non-inferiority setting. See also note.- relativeDelta
(
flag
):
IfTRUE
, then arelativeDelta
is used. Represents that a minimum response rate in magnitude ofdelta
of theS
non-responding patients is included as the margin between treatment and control group. See note.- tL
(
number
):
posterior probability threshold for being belowp0
.- tU
(
number
):
posterior probability threshold for being abovep1
.- parE
(
numeric
):
alpha and beta parameters for the prior on the treatment population. Default set at alpha = 1, beta = 1, or uniform prior.- parS
(
numeric
ormatrix
):
parameters for beta distribution. If it is a matrix, it needs to have 2 columns, and each row corresponds to each component of a beta-mixture distribution for theS
group. See details.- wiggle
(
flag
):
generate random look locations (not default). ifTRUE
, optional to specifydist
(see @details).- sim
(
number
):
number of simulations.- nnF
(
numeric
):
sample size or sizes where study can be stopped for Futility decision if different from Efficacy decision.
Details
The trial is stopped for Efficacy if the posterior probability of assumed
true response rate or truep
is better than the control arm by at least
deltaE
, is larger than tU
. Analogously, The trial is stopped for Efficacy
if the posterior probability of assumed true response rate or truep
is
better than the control arm by at least deltaF
, is larger than tL
for Futility looks. If these criteria are not met, the trial is continued
and at the maximum sample size, it may reach no decision or "gray zone".The
following represents the stopping criteria for Efficacy and Futility
respectively.
Stop criteria for Efficacy :
Pr(truep > P_S + deltaE) > tU
Stop criteria for Futility :
Pr(truep < P_S + deltaF) > tL
Where truep
is the assumed true rate of response and p1
and p0
respectively are
the thresholds for Efficacy and Futility respectively.
Resulting operating characteristics include the following:
ExpectedN
: expected number of patients in the trialsPrStopEarly
: probability to stop the trial early (before reaching the maximum sample size)PrEarlyEff
: probability of Early Go decisionPrEarlyFut
: probability of for Early Stop decisionPrEfficacy
: probability of Go decisionPrFutility
: probability of Stop decisionPrGrayZone
: probability between Go and Stop ,"Evaluate" or Gray decision zone
Note
Delta :
The desired improvement is denoted as deltaE
or deltaF
and two options
exist in its use: The absolute case when relativeDelta = FALSE
and
relative as when relativeDelta = TRUE
.
The absolute case is when we define an absolute delta, greater than
P_S
, the response rate of the standard of care or control orS
group such that the posterior isPr(truep > P_S + deltaE | data)
for Efficacy looks orPr(truep > P_S + deltaF | data)
for Futility looks.In the relative case, we suppose that the treatment group's response rate is assumed to be greater than
P_S + (1-P_S) * delta
such that the posterior isPr(truep > P_S + (1 - P_S) * deltaE | data)
for Efficacy looks orPr(truep > P_S + (1 - P_S) * deltaF | data)
for Futility looks.
Examples
# operating characteristics for posterior probability method with beta prior on SOC
# For three looks of 10, 20 and 30 we have the following assumptions :
# True response rate or truep of the treatment group = 40%
# The following are the Go and Stop rules respectively :
# Prior of treatment arm parE= Beta(1,1).
# stop for efficacy (deltaE): Pr(truep > P_S + deltaE) > tU
# stop for futility (deltaF): Pr(truep < P_S + deltaF) > tL
# Without random distance allowed for Futility and Efficacy Looks.
res1 <- ocPostprobDist(
nnE = c(10, 20, 30),
truep = 0.4,
deltaE = 0.1,
deltaF = -0.1,
tL = 0.6,
tU = 0.6,
parE = c(1, 1),
parS = c(5, 25),
sim = 50,
wiggle = FALSE
)
#> Warning: Advise to use sim >= 50000 to achieve convergence
res1$oc
#> ExpectedN PrStopEarly PrEarlyEff PrEarlyFut PrEfficacy PrFutility PrGrayZone
#> 1 16 0.72 0 0.72 0 0.84 0.16
# Allow random distance for Efficacy and Futility looks.
res2 <- ocPostprobDist(
nnE = c(10, 20, 30),
truep = 0.4,
deltaE = 0.1,
deltaF = -0.1,
tL = 0.6,
tU = 0.6,
parE = c(1, 1),
parS = c(5, 25),
sim = 50,
wiggle = TRUE
)
#> Warning: Advise to use sim >= 50000 to achieve convergence
res2$oc
#> ExpectedN PrStopEarly PrEarlyEff PrEarlyFut PrEfficacy PrFutility PrGrayZone
#> 1 14.18 0.9 0.06 0.84 0.06 0.88 0.06
# Allow Futility analysis only at the end.
res4 <- ocPostprobDist(
nnE = c(10, 20, 30),
truep = 0.4,
deltaE = 0.1,
deltaF = -0.1,
tL = 0.6,
tU = 0.6,
parE = c(1, 1),
parS = c(5, 25),
sim = 50,
wiggle = TRUE,
nnF = 30
)
#> Warning: Advise to use sim >= 50000 to achieve convergence
res4$oc
#> ExpectedN PrStopEarly PrEarlyEff PrEarlyFut PrEfficacy PrFutility PrGrayZone
#> 1 30 0 0 0 0 0.82 0.18