mods <- DoseFinding::Mods(linear = NULL,
emax = c(0.5, 1.2),
exponential = 2,
doses = c(0, 0.5, 2,4, 8),
maxEff = 6)
sd <- 12
prior_list <- list(Ctrl = RBesT::mixnorm(comp1 = c(w = 1, m = 0, s = 12), sigma = 2),
DG_1 = RBesT::mixnorm(comp1 = c(w = 1, m = 1, s = 12), sigma = 2),
DG_2 = RBesT::mixnorm(comp1 = c(w = 1, m = 1.2, s = 11), sigma = 2) ,
DG_3 = RBesT::mixnorm(comp1 = c(w = 1, m = 1.3, s = 11), sigma = 2) ,
DG_4 = RBesT::mixnorm(comp1 = c(w = 1, m = 2, s = 13), sigma = 2))
n_patients <- c(40, 60, 60, 60, 60)
success_probabilities <- assessDesign(
n_patients = n_patients,
mods = mods,
prior_list = prior_list,
sd = sd,
n_sim = 1e2) # speed up example run time
success_probabilities
if (interactive()) { # takes typically > 5 seconds
# with MED estimation without bootstrapping
# see ?getMED for details
success_probabilities <- assessDesign(
n_patients = n_patients,
mods = mods,
prior_list = prior_list,
sd = sd,
modeling = TRUE,
n_sim = 10, # speed up example run time
delta = 7)
success_probabilities
# with MED estimation with bootstrapping
success_probabilities <- assessDesign(
n_patients = n_patients,
mods = mods,
prior_list = prior_list,
sd = sd,
modeling = TRUE,
n_sim = 10, # speed up example run time
delta = 7,
evidence_level = 0.8)
success_probabilities
}
Run the code above in your browser using DataLab