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.
# S3 method for cat_bayes
traceplot(object, ...)
A traceplot displaying the MCMC chains' trace for each parameter, helping to assess convergence.
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.
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.