Produces a set of standard diagnostic plots to evaluate convergence and sampling efficiency
for a Bayesian model fitted using rstan.
diagnostic_bayes(model, var.param)A list of four ggplot2 objects:
A histogram of Rhat values (mcmc_rhat_hist).
A histogram of effective sample sizes (mcmc_neff_hist).
Trace plots of the MCMC chains for selected parameters (mcmc_trace).
Rank plots of the selected parameters across chains (mcmc_rank_overlay).
A fitted Bayesian model object created with rstan::stan().
A character vector specifying the names of the model parameters (e.g., slopes or coefficients) to include in the trace and rank plots.
This function uses the bayesplot package to visualize diagnostics commonly used to assess
convergence and sampling performance in MCMC estimation.