stan-dev/bayesplot

bayesplot R package for plotting Bayesian models

What it solves

It provides a comprehensive set of visualization tools for analyzing the results of Bayesian models, specifically those using Markov Chain Monte Carlo (MCMC) sampling. It simplifies the process of diagnosing model convergence, checking posterior distributions, and performing posterior predictive checks.

How it works

The package is built as a library of plotting functions for R. It generates plots as ggplot objects, allowing users to further customize them using the ggplot2 package. It supports various types of visualizations, including:

  • Posterior draw plots
  • Visual MCMC diagnostics (such as trace plots and energy diagnostics)
  • Posterior and prior predictive checking (PPC)
  • General plots of predictive distributions

Who it’s for

It is designed for users fitting Bayesian models (particularly those using Stan) and developers creating Bayesian modeling packages who need a standardized set of visualization functions.

Highlights

  • ggplot2 Integration: All plots are ggplot objects, making them fully customizable.
  • MCMC Diagnostics: Includes specialized tools for checking chain convergence and sampling efficiency.
  • Predictive Checking: Offers tools for graphical posterior and prior predictive checks.
  • Stan Ecosystem: While general, it is optimized for use with Stan-powered packages like rstan and rstanarm.

Related

  • Project
  • Project
  • Project
  • Project
  • Project