Calculate operating characteristics for predictive probability method with beta prior on SOC response rate (gray zone allowed in the final analysis for Decision 2)
Source:R/ocPredprobDist.R
ocPredprobDist.Rd
For formulas and expressions for predictive probability, refer to predprobDist()
.
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 or true rate (scenario).- deltaE
(
number
):
margin by which the response rate in the treatment group should be better than in the standard of care or control orS
group in Efficacy looks only. Note that this can also be negative as well.- deltaF
(
number
):
margin by which the response rate in the treatment group should be better than in the standard of care or control orS
group in Futility looks only. Note that this can also be negative as well.- phiU
(
number
):
upper threshold on the predictive probability.- xS
(
number
):
number of successes in theS
group at interim.- nS
(
number
):
number of patients in theE
group at interim.- relativeDelta
(
flag
):
IfTRUE
, then arelativeDelta
is used. Represents that a minimum response rate in magnitude ofdelta
of theS
non-responding patients. SeepostprobDist()
.- tT
(
number
):
threshold of which assumedtruep
exceeds acceptable threshold ofp0
.- tF
(
number
):
threshold of which assumedtruep
does not exceed threshold ofp1
.- phiL
(
number
):
lower threshold on the predictive probability.- phiFu
(
number
):
upper threshold on the predictive probability.- 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
):
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.- weights
(
numeric
):
the mixture weights of the beta mixture prior.- weightsS
(
numeric
):
weights for theS
group.- sim
(
number
):
number of simulations.- wiggle
(
flag
):
generate random look locations (not default). Ifwiggle = TRUE
andnnE = nnF
, then all wiggled looks are the same betweennnE
andnnF
.- nnF
(
numeric
):
sample size or sizes where study can be stopped for Futility decision if different from Efficacy decision.- decision1
(
flag
):
Flag ifdecision1 = TRUE
then Decision 1 rules will be used, otherwise Decision 2 rules will be used.
Value
A list with the following elements:
oc
: matrix with operating characteristics with the following details: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
Decision
: numeric of results withTRUE
as Go decision,FALSE
as Stop andNA
as gray zone.SampleSize
: numeric of sample sizes fromnnE
ornnF
or both.wiggled_nnE
: user input fornnE
with random distance applied.wiggled_nnF
: user input fornnF
with random distance applied.wiggled_dist
: magnitude of random distance applied in order of input looks.params
: all user input arguments.
Details
The rules for Stop, Go and Gray Zone (where applicable) are the same as in ocPredprob()
.
However when compared to ocPredprob()
, where the predictive probability of response rate > p0
was used to reach decisions, here the response rate - p0 > 0
is replaced by response rate - p0 > delta
,
and the reason is that p0
is now also uncertain, which is quantified by a posterior distribution.
To therefore understand the margin of difference between the experimental and control group, refer
to the two ways of calculating delta in postprobDist()
.
The margin delta
from postprobDist()
is no longer used however where a Go decision is evaluated,
the margin deltaE
is instead employed, and where a Stop decision is evaluated,
the margin deltaF
is instead employed in lieu of delta
.
Decision 1 and Decision 2 share the same Go rule for interim and final,
with the margin of difference is accounted for in the following manner for the final looks:
Pr(P_E > p0 + deltaE | data) > tT
for the absolute casePr(P_E > (1-p0)*deltaE | data) > tT
for the relative case
As mentioned, the rules of ocPredprobDist()
and ocPredprob()
for both Decision 1 and Decision 2 are the same,
and the margin of difference differ depending on whether it is a Go or Stop decision
(deltaE
and deltaF
is employed instead of delta
).
We highlight here another distinction between ocPredprob()
and ocPredprobDist()
,
seen in the evaluation for the final futility look in ocPredprobDist()
where p1
is used instead of p0
:
Pr(P_E < p1 + deltaF | data) > tF
for the absolute casePr(P_E < (1-p1)*deltaF | data) > tF
for the relative case
Examples
# Here we illustrate an example for Decision 1 with the following assumptions :
# Efficacy Looks and Futility looks are identical at sample size of 10, 20 and 30.
# True response rate or truep of the treatment group = 40%
# Desired difference to Standard of Care for Efficacy and Futility = 10%
# Delta calculation is absolute case. The following are the Final Stop rules respectively :
# - Final look for Efficacy:
# Pr( response rate + deltaE > 25% ) > 60% or P(response rate + deltaE > p0) > tT
# - Final look for Futility:
# Pr( response rate + deltaF < 25% ) < 60% or P(response rate + deltaF > p0) < tT
# - Interim look for Efficacy:
# Pr( success at final ) > 80% or P(success at final) > phiU
# - Interim look for Futility:
# Pr( failure at final ) < 20% or P(success at final) < phiL
# We assume a prior of treatment arm parE = Beta(1,1), unless otherwise indicated.
set.seed(20)
result <- ocPredprobDist(
nnE = c(10, 20, 30),
truep = 0.40,
deltaE = 0.10,
deltaF = 0.10,
relativeDelta = FALSE,
tT = 0.6,
phiU = 0.80,
phiL = 0.20,
parE = c(1, 1),
parS = c(5, 25),
weights = 1,
weightsS = 1,
sim = 50,
wiggle = FALSE,
decision1 = TRUE
)
#> Warning: Advise to use sim >= 50000 to achieve convergence
result$oc
#> ExpectedN PrStopEarly PrEarlyEff PrEarlyFut PrEfficacy PrFutility PrGrayZone
#> 1 16.4 0.8 0.66 0.14 0.82 0.18 0
# Here we illustrate an example for Decision 1 with the following assumptions :
# Efficacy Looks are at sample size of 10, 20 and 30 where sample looks are allowed to wiggle.
# Futility is only at sample size of 20 and 30. We won't do a futility at 10 patients.
# True response rate or truep of the treatment group = 40%
# Desired difference to Standard of Care for Efficacy and Futility is 10% and -10% respectively.
# Grey zone occurs due to different posterior probability distribution in the Efficacy and Futility rules.
# Delta calculation is absolute case. The following are the Final Stop rules respectively :
# - Final look for Efficacy: Pr( response rate + deltaE > 25% ) > 60% or P(response rate + deltaE > p0) > tT
# - Final look for Futility: Pr( response rate + deltaF < 25% ) < 60% or P(response rate + deltaF > p0) < tT
# - Interim look for Efficacy: Pr( success at final ) > 80% or P(success at final) > phiU
# - Interim look for Futility: Pr( failure at final ) < 20% or P(success at final) < phiL
# We assume a prior of treatment arm parE = Beta(1,1), unless otherwise indicated.
#
set.seed(20)
result <- ocPredprobDist(
nnE = c(10, 20, 30),
truep = 0.40,
deltaE = 0.10,
deltaF = -0.10,
relativeDelta = FALSE,
tT = 0.6,
phiU = 0.80,
phiL = 0.20,
parE = c(1, 1),
parS = c(5, 25),
weights = 1,
weightsS = 1,
sim = 50,
nnF = c(20, 30),
wiggle = TRUE,
decision1 = TRUE
)
#> Warning: Advise to use sim >= 50000 to achieve convergence
result$oc
#> ExpectedN PrStopEarly PrEarlyEff PrEarlyFut PrEfficacy PrFutility PrGrayZone
#> 1 25.8 0.28 0.28 0 0.96 0 0.04
# Here we illustrate an example for Decision 2 with the following assumptions :
# Efficacy Looks and Futility looks are identical at sample size of 10, 20 and 30
# where sample looks are allowed to wiggle.
# True response rate or truep of the treatment group = 40%
# Desired difference to Standard of Care for Efficacy and Futility = 50%
# Delta calculation is absolute case. The following are the Final Stop rules respectively :
# - Final look for Efficacy: Pr( response rate + deltaE > 25% ) > 60% or
# P(response rate + deltaE > p0) > tT
# - Final look for Futility: Pr( response rate + deltaF < 25% ) < 60% or
# P(response rate + deltaF > p0) < tT
# - Interim look for Efficacy: Pr( success at final ) > 80% or
# P(success at final) > phiU
# - Interim look for Futility: Pr( failure at final ) < 20% or
# P(success at final) < phiL
# We assume a prior of treatment arm parE = Beta(1,1), unless otherwise indicated.
set.seed(20)
result <- ocPredprobDist(
nnE = c(10, 20, 30),
truep = 0.40,
deltaE = 0.5,
deltaF = 0.5,
relativeDelta = FALSE,
tT = 0.6,
phiU = 0.80,
phiFu = 0.7,
parE = c(1, 1),
parS = c(5, 25),
weights = 1,
weightsS = 1,
sim = 50,
nnF = c(10, 20, 30),
wiggle = TRUE,
decision1 = FALSE
)
#> Warning: Advise to use sim >= 50000 to achieve convergence
result$oc
#> ExpectedN PrStopEarly PrEarlyEff PrEarlyFut PrEfficacy PrFutility PrGrayZone
#> 1 23.8 0.42 0 0.42 0 1 0
# Here we illustrate an example for Decision 2 with the following assumptions :
# Efficacy Looks and Futility looks are identical at sample size of 10, 20 and 30
# where wiggle is allowed.
# True response rate or truep of the treatment group = 40%
# Desired difference to Standard of Care for Efficacy and Futility = 50%
# Delta calculation is relative case. The following are the Final Stop rules respectively :
# - Final look for Efficacy: P( P_S + (1-P_S)*deltaE > 25% ) > 60% or P( P_S + (1-P_S)*deltaE > p0) > tT
# - Final look for Futility: P( P_S + (1-P_S)*deltaEF < 25% ) < 60% or P( P_S + (1-P_S)*deltaF > p0) < tT
# - Interim look for Efficacy: P( success at final ) > 80% or P(success at final) > phiU
# - Interim look for Futility: P( failure at final ) < 20% or P(success at final) < phiL
# We assume a prior of treatment arm parE = Beta(1,1), unless otherwise indicated.
set.seed(20)
result <- ocPredprobDist(
nnE = c(10, 20, 30),
truep = 0.40,
deltaE = 0.5,
deltaF = 0.5,
relativeDelta = TRUE,
tT = 0.6,
phiU = 0.80,
phiFu = 0.7,
parE = c(1, 1),
parS = c(5, 25),
weights = 1,
weightsS = 1,
sim = 50,
nnF = c(10, 20, 30),
wiggle = TRUE,
decision1 = FALSE
)
#> Warning: Advise to use sim >= 50000 to achieve convergence
result$oc
#> ExpectedN PrStopEarly PrEarlyEff PrEarlyFut PrEfficacy PrFutility PrGrayZone
#> 1 24.2 0.4 0 0.4 0 1 0