bayesplot provides ggplot2-based plotting functions for assessing Bayesian models fit with Stan or other samplers. It is designed to work directly with posterior draw arrays and integrates with rstanarm and other Stan-based packages.

What’s covered#

  • Model parameters – mcmc_areas() for posterior distribution plots with credible intervals
  • MCMC traceplots – mcmc_trace() for convergence diagnosis
  • Pairs plots – mcmc_pairs() for detecting correlated parameters
  • Posterior predictive checks – ppc_intervals(), ppc_stat_grouped() using posterior_predict()
  • NUTS diagnostics – mcmc_nuts_energy() for energy diagnostic plots