Calculate operating characteristics for posterior probability method.
It is assumed that the true response rate is truep
.
The trial is stopped for Efficacy if the posterior probability to be
above p1
is larger than tU
, and stopped for Futility if the posterior
probability to be below p0
is larger than tL
:
Stop criteria for Efficacy :
Pr(RR > p1) > tU
Stop criteria for Futility :
Pr(RR < p0) > tL
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
Usage
ocPostprob(
nnE,
truep,
p0,
p1,
tL,
tU,
parE = c(1, 1),
sim = 50000,
wiggle = FALSE,
nnF = nnE
)
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.- p0
(
number
):
lower Futility threshold of response rate.- p1
(
number
):
upper Efficacy threshold of response rate.- 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.- sim
(
number
):
number of simulations.- wiggle
(
flag
):
generate random look locations (not default). ifTRUE
, optional to specifydist
(see @details).- nnF
(
numeric
):
sample size or sizes where study can be stopped for Futility decision if different from Efficacy decision.
Value
A list with the following elements:
oc
: matrix with operating characteristics (see @details section)nn
: vector of look locations that was suppliednnE
: vector of Efficacy look locationsnnF
: vector of Futility look locationsparams
: user input arguments.
Examples
# 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 Stop rules respectively :
# Look for Efficacy: Pr(truep > 30% )> 80%
# Look for Futility: Pr(truep < 20% )> 60%
# Prior of treatment arm parE= Beta(1,1).
res <- ocPostprob(
nnE = c(10, 20, 30), truep = 0.40, p0 = 0.20, p1 = 0.30, tL = 0.60, tU = 0.80, parE = c(1, 1),
sim = 50, wiggle = TRUE, nnF = c(10, 20, 30)
)
#> Warning: Advise to use sim >= 50000 to achieve convergence
res$oc
#> ExpectedN PrStopEarly PrEarlyEff PrEarlyFut PrEfficacy PrFutility PrGrayZone
#> 1 18.28 0.7 0.6 0.1 0.82 0.1 0.08
# We specify the distance in this example.
res <- ocPostprob(
nnE = c(10, 20, 30), truep = 0.40, p0 = 0.20, p1 = 0.30, tL = 0.60, tU = 0.80, parE = c(1, 1),
sim = 50, wiggle = TRUE, nnF = c(10, 20, 30)
)
#> Warning: Advise to use sim >= 50000 to achieve convergence
res$oc
#> ExpectedN PrStopEarly PrEarlyEff PrEarlyFut PrEfficacy PrFutility PrGrayZone
#> 1 18 0.7 0.64 0.06 0.78 0.06 0.16
# Here, nnE = nnF, and no wiggle room is allowed. Random distance also not supplied.
res <- ocPostprob(
nnE = c(10, 20, 30), truep = 0.40, p0 = 0.20, p1 = 0.30, tL = 0.60, tU = 0.80, parE = c(1, 1),
sim = 50, wiggle = FALSE, nnF = c(10, 20, 30)
)
#> Warning: Advise to use sim >= 50000 to achieve convergence
res$oc
#> ExpectedN PrStopEarly PrEarlyEff PrEarlyFut PrEfficacy PrFutility PrGrayZone
#> 1 19.2 0.66 0.66 0 0.84 0 0.16
# Here, we only have one Futility and Efficacy look or stop.
res <- ocPostprob(
nnE = c(10), truep = 0.40, p0 = 0.20, p1 = 0.30, tL = 0.60, tU = 0.80, parE = c(1, 1),
sim = 50, wiggle = FALSE, nnF = 10
)
#> Warning: Advise to use sim >= 50000 to achieve convergence
res$oc
#> ExpectedN PrStopEarly PrEarlyEff PrEarlyFut PrEfficacy PrFutility PrGrayZone
#> 1 10 0 0 0 0.28 0.04 0.68
# Here, we only have one Futility but many Efficacy looks or stop.
res <- ocPostprob(
nnE = c(10, 20, 30), truep = 0.40, p0 = 0.20, p1 = 0.30, tL = 0.60, tU = 0.80, parE = c(1, 1),
sim = 50, wiggle = FALSE, nnF = 10
)
#> Warning: Advise to use sim >= 50000 to achieve convergence
res$oc
#> ExpectedN PrStopEarly PrEarlyEff PrEarlyFut PrEfficacy PrFutility PrGrayZone
#> 1 20.4 0.64 0.56 0.08 0.64 0.08 0.28