Skip to contents

Overview

Package overview

bayesplot-package bayesplot
bayesplot: Plotting for Bayesian Models

Aesthetics

Functions for setting the color scheme and ggplot theme used by bayesplot. (Also see the separate ggplot helpers section below.)

color_scheme_set() color_scheme_get() color_scheme_view()
Set, get, or view bayesplot color schemes
bayesplot_theme_get() bayesplot_theme_set() bayesplot_theme_update() bayesplot_theme_replace()
Get, set, and modify the active bayesplot theme
theme_default()
Default bayesplot plotting theme

PPC

Functions for carrying out a wide variety of graphical model checks based on comparing observed data to draws from the posterior or prior predictive distribution.

PPD

Functions for creating graphical displays of simulated data from the posterior or prior predictive distribution (PPD). These plots are essentially the same as the corresponding PPC plots but without comparing to any observed data.

MCMC

Functions for creating plots of MCMC draws of model parameters and general MCMC diagnostics.

HMC/NUTS diagnostics

Functions for plotting diagnostics specific to Hamiltonian Monte Carlo (HMC) and the No-U-Turn Sampler (NUTS). Some of the general MCMC plotting functions (mcmc_parcoord(), mcmc_pairs(), mcmc_scatter(), mcmc_trace()) can also show HMC/NUTS diagnostic information if optional arguments are specified, but the special functions below are only intended for use with HMC/NUTS.

Tidy parameter selection for MCMC plots

Helper functions for tidy parameter selection and examples of using bayesplot with dplyr.

param_range() param_glue()
Tidy parameter selection

ggplot helpers

Convenience functions for arranging multiple plots, adding features to plots, and shortcuts for modifying individual ggplot theme elements.

Extractors

Functions extracting various quantities needed for plotting from different types of fitted model objects.

log_posterior() nuts_params() rhat() neff_ratio()
Extract quantities needed for plotting from model objects

Miscellaneous

Functions for generating data for examples and listing available plotting functions.

example_mcmc_draws() example_yrep_draws() example_y_data() example_x_data() example_group_data()
Example draws to use in demonstrations and tests
available_ppc() available_ppd() available_mcmc()
Get or view the names of available plotting or data functions