Learn R Programming

bssm (version 2.0.2)

plot.mcmc_output: Trace and Density Plots for mcmc_output

Description

Plots the trace and density plots of the hyperparameters theta from the MCMC run by run_mcmc.

Usage

# S3 method for mcmc_output
plot(x, ...)

Value

The output object from bayesplot::mcmc_combo.

Arguments

x

Object of class mcmc_output from run_mcmc.

...

Further arguments to bayesplot::mcmc_combo.

Details

For further visualization (of the states), you can extract the posterior samples with as.data.frame and as_draws methods to be used for example with the bayesplot or ggplot2 packages.

See Also

check_diagnostics for a quick diagnostics statistics of the model.

Examples

Run this code
data("negbin_model")
# Note the very small number of iterations, so the plots look bad
plot(negbin_model)

Run the code above in your browser using DataLab