density_plot: Create a density plot for a single desired node

View source: R/density_plot.R

density_plotR Documentation

Create a density plot for a single desired node

Description

Used by diag_plots(), not intended to be called separately

Usage

density_plot(post, param, show_diags = "if_poor_Rhat")

Arguments

post

A mcmc.list object.

param

A regular expression that matches a single element in the model. E.g., "b0[1]", not "b0". See match_params().

show_diags

Control when to display numerical diagnostic summaries on plots. Must be one of "always", "never", or "if_poor_Rhat". "if_poor_Rhat" (the default) will display the Rhat and effective MCMC samples if the Rhat statistic is greater than 1.1.

Value

A figure showing the posterior density, separated by chain.

Note

This is not a function users will generally use directly. Call diag_plots() instead.


bstaton1/codaTools documentation built on Jan. 1, 2023, 12:17 p.m.