View source: R/optimal_multitrial.R
optimal_multitrial | R Documentation |
The function optimal_multitrial
of the drugdevelopR package enables planning of phase II/III drug development programs with time-to-event endpoints for programs with several phase III trials (Preussler et. al, 2019).
Its main output values are the optimal sample size allocation and optimal go/no-go decision rules.
The assumed true treatment effects can be assumed to be fixed (planning is then also possible via user friendly R Shiny App: multitrial) or can be 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.
optimal_multitrial(
w,
hr1,
hr2,
id1,
id2,
d2min,
d2max,
stepd2,
hrgomin,
hrgomax,
stephrgo,
alpha,
beta,
xi2,
xi3,
c2,
c3,
c02,
c03,
K = Inf,
N = Inf,
S = -Inf,
b1,
b2,
b3,
case,
strategy = TRUE,
fixed = FALSE,
num_cl = 1
)
w |
weight for mixture prior distribution, see this Shiny application for the choice of weights |
hr1 |
first assumed true treatment effect on HR scale for prior distribution |
hr2 |
second assumed true treatment effect on HR scale for prior distribution |
id1 |
amount of information for |
id2 |
amount of information for |
d2min |
minimal number of events for phase II |
d2max |
maximal number of events for phase II |
stepd2 |
step size for the optimization over d2 |
hrgomin |
minimal threshold value for the go/no-go decision rule |
hrgomax |
maximal threshold value for the go/no-go decision rule |
stephrgo |
step size for the optimization over HRgo |
alpha |
one-sided significance level |
beta |
type II error rate; i.e. |
xi2 |
assumed event rate for phase II, used for calculating the sample size of phase II via |
xi3 |
event rate for phase III, used for calculating the sample size of phase III in analogy to |
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 |
fixed |
choose if true treatment effects are fixed or random, if TRUE hr1 is used as a fixed effect and hr2 is ignored |
num_cl |
number of clusters used for parallel computing, default: 1 |
The output of the function is a data.frame
object containing the optimization results:
Case: "number of significant trials needed"
Strategy: "number of trials to be conducted in order to achieve the goal of the case"
maximal expected utility under the optimization constraints, i.e. the expected utility of the optimal sample size and threshold value
optimal threshold value for the decision rule to go to phase III
optimal total number of events for phase II
total expected number of events for phase III; rounded to next natural number
total expected number of events in the program; d = d2 + d3
total sample size for phase II; rounded to the next even natural number
total sample size for phase III; rounded to the next even natural number
total sample size in the program; n = n2 + n3
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)
probability to go to phase III
probability of a successful program
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))
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))
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))
expected costs for phase II
expected costs for phase III
and further input parameters. Taking cat(comment())
of the
data frame lists the used optimization sequences, start and
finish date of the optimization procedure.
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.
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.
Preussler, S., Kieser, M., and Kirchner, M. (2019). Optimal sample size allocation and go/no-go decision rules for phase II/III programs where several phase III trials are performed. Biometrical Journal, 61(2), 357-378.
Schoenfeld, D. (1981). The asymptotic properties of nonparametric tests for comparing survival distributions. Biometrika, 68(1), 316-319.
# Activate progress bar (optional)
## Not run: progressr::handlers(global = TRUE)
# Optimize
optimal_multitrial(w = 0.3, # define parameters for prior
hr1 = 0.69, hr2 = 0.88, id1 = 210, id2 = 420, # (https://web.imbi.uni-heidelberg.de/prior/)
d2min = 20, d2max = 100, stepd2 = 5, # define optimization set for d2
hrgomin = 0.7, hrgomax = 0.9, stephrgo = 0.05, # define optimization set for HRgo
alpha = 0.025, beta = 0.1, xi2 = 0.7, xi3 = 0.7, # 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 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.