Optimal phase II/III drug development planning where several phase III trials are performed
Source:R/optimal_multitrial_binary.R
optimal_multitrial_binary.Rd
The optimal_multitrial_binary
function enables planning of phase II/III
drug development programs with several phase III trials for the same
binary endpoint. The main output values are optimal sample size allocation
and go/no-go decision rules. For binary endpoints, the treatment effect is
measured by the risk ratio (RR).
Usage
optimal_multitrial_binary(
w,
p0,
p11,
p12,
in1,
in2,
n2min,
n2max,
stepn2,
rrgomin,
rrgomax,
steprrgo,
alpha,
beta,
c2,
c3,
c02,
c03,
K = Inf,
N = Inf,
S = -Inf,
b1,
b2,
b3,
case,
strategy = TRUE,
fixed = FALSE,
num_cl = 1
)
Arguments
- w
weight for mixture prior distribution
- p0
assumed true rate of control group, see here for details
- p11
assumed true rate of treatment group, see here for details
- p12
assumed true rate of treatment group, see here for details
- in1
amount of information for
p11
in terms of sample size, see here for details- in2
amount of information for
p12
in terms of sample size, see here for details- n2min
minimal total sample size for phase II; must be an even number
- n2max
maximal total sample size for phase II, must be an even number
- stepn2
step size for the optimization over n2; must be an even number
- rrgomin
minimal threshold value for the go/no-go decision rule
- rrgomax
maximal threshold value for the go/no-go decision rule
- steprrgo
step size for the optimization over RRgo
- alpha
one-sided significance level
- beta
type II error rate; i.e.
1 - beta
is the power for calculation of the number of events for phase III- c2
variable per-patient cost for phase II in 10^5 $
- c3
variable per-patient cost for phase III in 10^5 $
- c02
fixed cost for phase II in 10^5 $
- c03
fixed cost for phase III in 10^5 $
- K
constraint on the costs of the program, default: Inf, e.g. no constraint
- N
constraint on the total expected sample size of the program, default: Inf, e.g. no constraint
- S
constraint on the expected probability of a successful program, default: -Inf, e.g. no constraint
- b1
expected gain for effect size category "small"
- b2
expected gain for effect size category "medium"
- b3
expected gain for effect size category "large"
- case
choose case: "at least 1, 2 or 3 significant trials needed for approval"
- strategy
choose strategy: "conduct 1, 2, 3 or 4 trials in order to achieve the case's goal"; TRUE calculates all strategies of the selected
case
- fixed
choose if true treatment effects are fixed or random, if TRUE p11 is used as fixed effect for p1
- num_cl
number of clusters used for parallel computing, default: 1
Value
The output of the function is a data.frame
object containing the optimization results:
- Strategy
Strategy: "number of trials to be conducted in order to achieve the goal of the case"
- u
maximal expected utility under the optimization constraints, i.e. the expected utility of the optimal sample size and threshold value
- RRgo
optimal threshold value for the decision rule to go to phase III
- n2
total sample size for phase II; rounded to the next even natural number
- n3
total sample size for phase III; rounded to the next even natural number
- n
total sample size in the program; n = n2 + n3
- K
maximal costs of the program (i.e. the cost constraint, if it is set or the sum K2+K3 if no cost constraint is set)
- pgo
probability to go to phase III
- sProg
probability of a successful program
- sProg1
probability of a successful program with "small" treatment effect in phase III (lower boundary in HR scale is set to 1, as proposed by IQWiG (2016))
- sProg2
probability of a successful program with "medium" treatment effect in phase III (lower boundary in HR scale is set to 0.95, as proposed by IQWiG (2016))
- sProg3
probability of a successful program with "large" treatment effect in phase III (lower boundary in HR scale is set to 0.85, as proposed by IQWiG (2016))
- K2
expected costs for phase II
- K3
expected costs for phase III
and further input parameters. Taking cat(comment())
of the
data frame lists the used optimization sequences, start and
finish time of the optimization procedure. The attribute
attr(,"trace")
returns the utility values of all parameter
combinations visited during optimization.
Details
The assumed true treatment effects can be assumed fixed or modelled by a prior distribution. The R Shiny application prior visualizes the prior distributions used in this package.
Fast computing is enabled by parallel programming.
Effect sizes
In other settings, the definition of "small", "medium" and "large" effect
sizes can be user-specified using the input parameters steps1
, stepm1
and
stepl1
. Due to the complexity of the multitrial setting, this feature is
not included for this setting. Instead, the effect sizes were set to
to predefined values as explained under sProg1, sProg2 and sProg3 in the
Value section.
References
IQWiG (2016). Allgemeine Methoden. Version 5.0, 10.07.2016, Technical Report. Available at https://www.iqwig.de/ueber-uns/methoden/methodenpapier/, assessed last 15.05.19.
Examples
# Activate progress bar (optional)
if (FALSE) progressr::handlers(global = TRUE) # \dontrun{}
# Optimize
# \donttest{
optimal_multitrial_binary(w = 0.3, # define parameters for prior
p0 = 0.6, p11 = 0.3, p12 = 0.5,
in1 = 30, in2 = 60, # (https://web.imbi.uni-heidelberg.de/prior/)
n2min = 20, n2max = 100, stepn2 = 4, # define optimization set for n2
rrgomin = 0.7, rrgomax = 0.9, steprrgo = 0.05, # define optimization set for RRgo
alpha = 0.025, beta = 0.1, # drug development planning parameters
c2 = 0.75, c3 = 1, c02 = 100, c03 = 150, # fixed and variable costs for phase II/III,
K = Inf, N = Inf, S = -Inf, # set constraints
b1 = 1000, b2 = 2000, b3 = 3000, # expected benefit for a each effect size
case = 1, strategy = TRUE, # chose Case and Strategy
fixed = TRUE, # true treatment effects are fixed/random
num_cl = 1) # number of cores for parallelized computing
#> Optimization result with 1 significant trial(s) needed, strategy 1:
#> Utility: 1705.68
#> Sample size:
#> phase II: 100, phase III: 180, total: 280
#> Probability to go to phase III: 0.98
#> Total cost:
#> phase II: 175, phase III: 328, cost constraint: Inf
#> Fixed cost:
#> phase II: 100, phase III: 150
#> Variable cost per patient:
#> phase II: 0.75, phase III: 1
#> Effect size categories (expected gains):
#> small: 1 (1000), medium: 0.95 (2000), large: 0.85 (3000)
#> Success probability: 0.8
#> Joint probability of success and observed effect of size ... in phase III:
#> small: 0.04, medium: 0.12, large: 0.65
#> Significance level: 0.025
#> Targeted power: 0.9
#> Decision rule threshold: 0.85 [RRgo]
#> Assumed true effect:
#> rate in the control: 0.6, rate in the treatment group: 0.3
#>
#> Optimization result with 1 significant trial(s) needed, strategy 2:
#> Utility: 1794.26
#> Sample size:
#> phase II: 100, phase III: 324, total: 424
#> Probability to go to phase III: 0.97
#> Total cost:
#> phase II: 175, phase III: 616, cost constraint: Inf
#> Fixed cost:
#> phase II: 100, phase III: 150
#> Variable cost per patient:
#> phase II: 0.75, phase III: 1
#> Effect size categories (expected gains):
#> small: 1 (1000), medium: 0.95 (2000), large: 0.85 (3000)
#> Success probability: 0.9
#> Joint probability of success and observed effect of size ... in phase III:
#> small: 0.02, medium: 0.08, large: 0.8
#> Significance level: 0.025
#> Targeted power: 0.9
#> Decision rule threshold: 0.8 [RRgo]
#> Assumed true effect:
#> rate in the control: 0.6, rate in the treatment group: 0.3
#>
# }