plotChains: MCMC Diagnostic Plots

Description Usage Arguments Details Value Examples

View source: R/plotChains.R

Description

Displays traceplots and cumulative means. Draws on Edward Tufte's minimalist aesthetic ideas for the design.

Usage

1
2
plotChains(fit, keeppars = NULL, droppars = c("ySim", "log_lik"),
  col = "blues", nrow = 4, ncol = 2)

Arguments

fit

the stanfit or runjags object

keeppars

the names of the parameters to be plotted.

col

the color scheme. One of "blue" (the default), "darkblue", "purples", "reds", "greens", "mix" , or "mix2"

nrow

number of rows in the layout

ncol

number of columns in the layout

Details

Traceplots should look very fuzzy and chaotic. If they look more ordered and correlated that indicates a problem with the sampler or model specification.

Cumulative mean plots display how quickly the model converges onto the expected value. The chains should all converge onto the same value or very close value very quickly. If they do not, they indicates you either need to draw more samples, use a longer adaptation and/or burnin/warmup for the MCMC chains, or perhaps reconsider the model if those do not work.

Value

a base R plot

Examples

1

abnormally-distributed/Bayezilla documentation built on Oct. 31, 2019, 1:57 a.m.