plotMCMC_Diagnostics: Make diagnostic plots for a parameter in an rstan mcmc...

View source: R/plotMCMC_Diagnostics.R

plotMCMC_DiagnosticsR Documentation

Make diagnostic plots for a parameter in an rstan mcmc simulation

Description

Function to make diagnostic plots for a parameter in an rstan mcmc simulation.

Usage

plotMCMC_Diagnostics(mcmc, var, label = var)

Arguments

mcmc
  • mcmc object compatible with basyesplot (i.e., from running rstan::sampling() or tmbstan::tmbstan())

var
  • name of variable to plot

label
  • label to use for variable (default=var)

Details

Requires the bayesplot and cowplot packages. Combines plots from running bayesplot::mcmc_trace(), bayesplot::mcmc_acf_bar(), bayesplot::mcmc_hist(), and bayesplot::mcmc_areas() for the model parameter identified by var Plots are combined using cowplot::plot_grid(). The label input can be specified to provide a more informative name for the plotted parameter.

Value

a ggplot2::gg object (or NULL if the bayesplot package is not installed.)


wStockhausen/wtsPlots documentation built on July 19, 2023, 8:15 p.m.