Running examples in ‘RBesT-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: gMAP
> ### Title: Meta-Analytic-Predictive Analysis for Generalized Linear Models
> ### Aliases: gMAP print.gMAP fitted.gMAP coef.gMAP as.matrix.gMAP
> ###   summary.gMAP
> 
> ### ** Examples
> 
> ## Setting up dummy sampling for fast execution of example
> ## Please use 4 chains and 20x more warmup & iter in practice
> .user_mc_options <- options(RBesT.MC.warmup=50, RBesT.MC.iter=100,
+                             RBesT.MC.chains=2, RBesT.MC.thin=1)
> 
> # Binary data example 1
> 
> # Mean response rate is ~0.25. For binary endpoints
> # a conservative choice for tau is a HalfNormal(0,1) as long as
> # the mean response rate is in the range of 0.2 to 0.8. For
> # very small or large rates consider the n_infinity approach
> # illustrated below.
> # for exact reproducible results, the seed must be set
> set.seed(34563)
> map_AS <- gMAP(cbind(r, n-r) ~ 1 | study,
+                family=binomial,
+                data=AS,
+                tau.dist="HalfNormal", tau.prior=1,
+                beta.prior=2)
Assuming default prior location   for beta: 0
Warning: The largest R-hat is 1.11, 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
Warning in gMAP(cbind(r, n - r) ~ 1 | study, family = binomial, data = AS,  :
  Maximal Rhat > 1.1. Consider increasing RBesT.MC.warmup MCMC parameter.
Final MCMC sample equivalent to less than 1000 independent draws.
Please consider increasing the MCMC simulation size.
> print(map_AS)
Generalized Meta Analytic Predictive Prior Analysis

Call:  gMAP(formula = cbind(r, n - r) ~ 1 | study, family = binomial, 
    data = AS, tau.dist = "HalfNormal", tau.prior = 1, beta.prior = 2)

Exchangeability tau strata: 1 
Prediction tau stratum    : 1 
Maximal Rhat              : 1.11 

Between-trial heterogeneity of tau prediction stratum
 mean    sd  2.5%   50% 97.5% 
0.370 0.163 0.110 0.352 0.764 

MAP Prior MCMC sample
  mean     sd   2.5%    50%  97.5% 
0.2580 0.0817 0.1230 0.2510 0.4460 
> 
> # obtain numerical summaries
> map_sum <- summary(map_AS)
> print(map_sum)
Heterogeneity parameter tau per stratum:
       mean    sd 2.5%   50% 97.5%
tau[1] 0.37 0.163 0.11 0.352 0.764

Regression coefficients:
             mean    sd  2.5%   50%  97.5%
(Intercept) -1.12 0.178 -1.47 -1.11 -0.767

Mean estimate MCMC sample:
            mean    sd  2.5%   50% 97.5%
theta_resp 0.248 0.033 0.187 0.247 0.317

MAP Prior MCMC sample:
                 mean     sd  2.5%   50% 97.5%
theta_resp_pred 0.258 0.0817 0.123 0.251 0.446
> names(map_sum)
[1] "tau"        "beta"       "theta.pred" "theta"     
> # [1] "tau"        "beta"       "theta.pred" "theta"
> map_sum$theta.pred
                     mean         sd      2.5%       50%     97.5%
theta_resp_pred 0.2576768 0.08166927 0.1232554 0.2508299 0.4464658
> 
> 
> # obtain shrinkage estimates
> fitted(map_AS)
             mean         sd       2.5%       50%     97.5%
Study 1 0.2245230 0.03009877 0.16467408 0.2255518 0.2698386
Study 2 0.2600974 0.05160094 0.17318985 0.2610201 0.3745415
Study 3 0.3157218 0.06628311 0.21188389 0.3041774 0.4656744
Study 4 0.2440305 0.04812868 0.15154707 0.2442546 0.3333963
Study 5 0.2681039 0.03179363 0.21285005 0.2633981 0.3412085
Study 6 0.2670423 0.05109495 0.19112391 0.2609730 0.3660353
Study 7 0.1704818 0.04185255 0.08821842 0.1727647 0.2466163
Study 8 0.2649455 0.04246509 0.20001270 0.2574109 0.3462487
> 
> # regression coefficients
> coef(map_AS)
                mean        sd      2.5%       50%      97.5%
(Intercept) -1.11748 0.1782488 -1.468582 -1.113787 -0.7667301
> 
> # finally fit MAP prior with parametric mixture
> map_mix <- mixfit(map_AS, Nc=2)
> plot(map_mix)$mix
Error in parameter_names.array(x) : is_3d_array(x) is not TRUE
Calls: plot ... parameter_names -> parameter_names.array -> stopifnot
Execution halted