The optimal_binary
function of the drugdevelopR package enables
planning of phase II/III drug development programs with optimal sample size
allocation and go/no-go decision rules for binary endpoints. In this case,
the treatment effect is measured by the risk ratio (RR). The assumed true
treatment effects can be assumed to be 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.
optimal_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,
steps1 = 1,
stepm1 = 0.95,
stepl1 = 0.85,
b1,
b2,
b3,
gamma = 0,
fixed = FALSE,
skipII = FALSE,
num_cl = 1
)
The output of the function is a data.frame
object containing the optimization results:
optimal threshold value for the decision rule to go to phase III
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
probability of a successful program with "medium" treatment effect in phase III
probability of a successful program with "large" treatment effect in phase III
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 time of the optimization procedure. The attribute
attr(,"trace")
returns the utility values of all parameter
combinations visited during optimization.
weight for mixture prior distribution
assumed true rate of control group, see here for details
assumed true rate of treatment group, see here for details
assumed true rate of treatment group, see here for details
amount of information for p11
in terms of sample size, see
here
for details
amount of information for p12
in terms of sample size, see
here
for details
minimal total sample size for phase II; must be an even number
maximal total sample size for phase II, must be an even number
step size for the optimization over n2; must be an even number
minimal threshold value for the go/no-go decision rule
maximal threshold value for the go/no-go decision rule
step size for the optimization over RRgo
one-sided significance level
type II error rate; i.e. 1 - beta
is the power for calculation of the number of events for phase III
variable per-patient cost for phase II in 10^5 $
variable per-patient cost for phase III in 10^5 $
fixed cost for phase II in 10^5 $
fixed cost for phase III in 10^5 $
constraint on the costs of the program, default: Inf, e.g. no constraint
constraint on the total expected sample size of the program, default: Inf, e.g. no constraint
constraint on the expected probability of a successful program, default: -Inf, e.g. no constraint
lower boundary for effect size category "small" in RR scale, default: 1
lower boundary for effect size category "medium" in RR scale = upper boundary for effect size category "small" in RR scale, default: 0.95
lower boundary for effect size category "large" in RR scale = upper boundary for effect size category "medium" in RR scale, default: 0.85
expected gain for effect size category "small"
expected gain for effect size category "medium"
expected gain for effect size category "large"
to model different populations in phase II and III choose gamma != 0
, default: 0, see
here
for details
choose if true treatment effects are fixed or random, if TRUE p11 is used as fixed effect for p1
skipII choose if skipping phase II is an option, default: FALSE;
if TRUE, the program calculates the expected utility for the case when phase
II is skipped and compares it to the situation when phase II is not skipped.
The results are then returned as a two-row data frame, res[1, ]
being the results when including phase II and res[2, ]
when skipping phase II.
res[2, ]
has an additional parameter, res[2, ]$median_prior_RR
, which is
the assumed effect size used for planning the phase III study when the
phase II is skipped.
number of clusters used for parallel computing, default: 1
IQWiG (2016). Allgemeine Methoden. Version 5.0, 10.07.2016, Technical Report. Available at https://www.iqwig.de/ueber-uns/methoden/methodenpapier/, last access 15.05.19.
# Activate progress bar (optional)
if (FALSE) {
progressr::handlers(global = TRUE)
}
# Optimize
# \donttest{
optimal_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
steps1 = 1, # define lower boundary for "small"
stepm1 = 0.95, # "medium"
stepl1 = 0.85, # and "large" treatment effect size categories
b1 = 1000, b2 = 2000, b3 = 3000, # define expected benefits
gamma = 0, # population structures in phase II/III
fixed = FALSE, # true treatment effects are fixed/random
skipII = FALSE, # choose if skipping phase II is an option
num_cl = 2) # number of cores for parallelized computing
# }
Run the code above in your browser using DataLab