## Setting up dummy sampling for fast execution of example
## Please use 4 chains and 100x more warmup & iter in practice
.user_mc_options <- options(
OncoBayes2.MC.warmup = 10, OncoBayes2.MC.iter = 20, OncoBayes2.MC.chains = 1,
OncoBayes2.MC.save_warmup = FALSE
)
# construct initial blrm_trial object from built-in example datasets
combo2_trial_setup <- blrm_trial(
data = hist_combo2,
dose_info = dose_info_combo2,
drug_info = drug_info_combo2,
simplified_prior = TRUE
)
# extract blrm_call to see setup of the prior as passed to blrm_exnex
summary(combo2_trial_setup, "blrm_exnex_call")
# extract ewoc precision accuracy
ec <- summary(combo2_trial_setup, "ewoc_check")
# find any ewoc metrics which are within 95% MCMC error of the threshold
# these are counted as "imprecise" when printing blrm_trial objects
subset(ec, abs(prob_overdose_stat) < qnorm(0.975))
# ensure that the ewoc metric only flags "ok" whenever the MCMC error
# is with 95% below the threshold
ewoc_ok <- ec$prob_overdose_stat < qnorm(0.025)
## Recover user set sampling defaults
options(.user_mc_options)
Run the code above in your browser using DataLab