# \donttest{
# Basic BOIN simulation
target <- 0.30
p_true <- c(0.10, 0.25, 0.40, 0.55, 0.70)
result <- get_pts_and_tox(
n_trials = 1000,
target = target,
p_true = p_true,
n_cohort = 10,
cohort_size = 3,
n_earlystop = 18,
seed = 123
)
# With titration phase
result_titration <- get_pts_and_tox(
n_trials = 1000,
target = target,
p_true = p_true,
n_cohort = 10,
cohort_size = 3,
titration = TRUE,
seed = 123
)
# With extra safety stopping
result_safe <- get_pts_and_tox(
n_trials = 1000,
target = target,
p_true = p_true,
n_cohort = 10,
cohort_size = 3,
extrasafe = TRUE,
offset = 0.05,
seed = 123
)
# }
Run the code above in your browser using DataLab