Running examples in 'OncoBayes2-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: posterior_linpred.blrmfit
> ### Title: Posterior of linear predictor
> ### Aliases: posterior_linpred.blrmfit posterior_linpred
> 
> ### ** Examples
> 
> ## 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)
> 
> 
> ## run single-agent analysis which defines blrmfit model object
> example_model("single_agent")
Running single_agent example:

 library(RBesT)

 ## Example from Neuenschwander, B., et al. (2009). Stats in Medicine

 num_comp <- 1 # one investigational drug
 num_inter <- 0 # no drug-drug interactions need to be modeled
 num_groups <- nlevels(hist_SA$group_id) # no stratification needed
 num_strata <- 1 # no stratification needed


 dref <- 50

 ## Since there is no prior information the hierarchical model
 ## is not used in this example by setting tau to (almost) 0.
 blrmfit <- blrm_exnex(
   cbind(num_toxicities, num_patients - num_toxicities) ~
     1 + log(drug_A / dref) |
     0 |
     group_id,
   data = hist_SA,
   prior_EX_mu_mean_comp = matrix(
     c(logit(1/2), # mean of intercept on logit scale
       log(1)),    # mean of log-slope on logit scale
     nrow = num_comp,
     ncol = 2
   ),
   prior_EX_mu_sd_comp = matrix(
     c(2,  # sd of intercept
       1), # sd of log-slope
     nrow = num_comp,
     ncol = 2
   ),
   ## Here we take tau as known and as zero.
   ## This disables the hierarchical prior which is
   ## not required in this example as we analyze a
   ## single trial.
   prior_EX_tau_mean_comp = matrix(
     c(0, 0),
     nrow = num_comp,
     ncol = 2
   ),
   prior_EX_tau_sd_comp = matrix(
     c(1, 1),
     nrow = num_comp,
     ncol = 2
   ),
   prior_EX_prob_comp = matrix(1, nrow = num_comp, ncol = 1),
   prior_tau_dist = 0,
   prior_PD = FALSE
 )

This is RBesT version 1.5.4
Warning: The largest R-hat is 1.77, indicating chains have not mixed.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#r-hat
Warning: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#bulk-ess
Warning: Tail Effective Samples Size (ESS) is too low, indicating posterior variances and tail quantiles may be unreliable.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#tail-ess
> 
> ## obtain posterior of linear prediction on 0-1 scale
> post_prob_dlt <- posterior_linpred(blrmfit, TRUE, newdata=hist_SA)
> ## name columns to obtain nice bayesplot labels
> colnames(post_prob_dlt) <- hist_SA$drug_A
> 
> library(bayesplot)
This is bayesplot version 1.7.0
- Online documentation and vignettes at mc-stan.org/bayesplot
- bayesplot theme set to bayesplot::theme_default()
   * Does _not_ affect other ggplot2 plots
   * See ?bayesplot_theme_set for details on theme setting
> library(ggplot2)
> mcmc_intervals(post_prob_dlt, prob=0.5, prob_outer=0.95) +
+     coord_flip() +
+     vline_at(c(0.16, 0.33), linetype=2) +
+     ylab("Dose [mg]") +
+     ggtitle("Posterior Probability of a DLT") +
+     scale_x_continuous(breaks=c(0.1,0.16,0.33, 0.5, 0.75))
Error in parameter_names.array(x) : is_3d_array(x) is not TRUE
Calls: mcmc_intervals ... parameter_names -> parameter_names.array -> stopifnot
Execution halted