Skip to contents

Plot the posterior draws of each term against iteration, one panel per term and one line per chain, to check that the chains have mixed.

Usage

kb_plot_trace(fit, ..., ncol = 2L)

Arguments

fit

A kb_fit object.

...

These dots are for future extensions and must be empty.

ncol

A whole number of panel columns.

Value

A ggplot object. It sets no theme, so it takes the active one (ggplot2::theme_get()); add a theme with + to change it.

Details

The terms are those reported by tidy(): the population-level coefficients and the random-effect standard deviations. Chains that have converged resemble a "fuzzy caterpillar", overlapping and wandering around a common value with no trend. A chain stuck apart from the others, or slowly drifting, indicates a convergence problem, which kb_converged(), glance(), and summary() also report.

Examples

kb_plot_trace(fit_weight_sim_nereo)