plot_mcmc_diagnostics: Plot MCMC diagnostics

View source: R/plot-mcmc-diagnostics.R

plot_mcmc_diagnosticsR Documentation

Plot MCMC diagnostics

Description

Plot MCMC diagnostics

Usage

plot_mcmc_diagnostics(
  model,
  post_regex,
  post_name,
  probs = c(0.025, 0.5, 0.975),
  color = "blue",
  fill = "blue",
  rib_alpha = 0.2,
  line_bar_alpha = 1,
  ...
)

Arguments

model

A model object as output by create_rds_file().

post_regex

A regular expression representing a parameter as it appears in the r4ss::SS_output() column.

post_name

A name to show for the posterior on the plot, where the name can be a string or an expression.

probs

A vector of 3 values for the lower, median, and upper quantiles

...

Arguments passed to plot_autocor()

all_alpha

Alpha value for density and running mean plots

Details

Panels are as follows:

  • Top left: traces of posteriors across iterations,

  • Top right: cumulative running median with 2.5th and 97.5th percentiles

  • Bottom left: autocorrelation present in the chain at different lag times (i.e., distance between samples in the chain), and

  • Bottom right: distribution of the values in the chain (i.e., the marginal density from a smoothed histogram of values in the trace plot).

Value

A 4-panel plot of MCMC diagnostics


pacific-hake/hake-assessment documentation built on Nov. 8, 2024, 1:16 p.m.