traceplot.cat_bayes: Traceplot for Bayesian Sampling Model

View source: R/plots.R

traceplot.cat_bayesR Documentation

Traceplot for Bayesian Sampling Model

Description

This function generates a traceplot for the Bayesian sampling model fitted using rstan. It utilizes the traceplot function from the rstan package to visualize the sampling progress and convergence of the Markov Chain Monte Carlo (MCMC) chains for the given model.

Usage

## S3 method for class 'cat_bayes'
traceplot(object, ...)

Arguments

object

A fitted model object of class cat_bayes that contains the Stan sampling model. The object should include the stan_sample_model, which is the result of fitting the model using the rstan package.

...

Additional arguments passed to the rstan::traceplot function. These can include customization options for the traceplot, such as pars for selecting specific parameters or inc_warmup for including or excluding warmup iterations.

Details

The function calls rstan::traceplot on the stan_sample_model contained within the x object. The resulting plot displays the trace of each parameter across MCMC iterations, helping to assess the convergence and mixing of the chains.

Value

A traceplot displaying the MCMC chains' trace for each parameter, helping to assess convergence.


catalytic documentation built on April 4, 2025, 5:51 a.m.