traceplot.cat_gibbs | R Documentation |
This function generates a traceplot for the Gibbs sampling model, which is typically used for posterior sampling in a Bayesian context. The traceplot visualizes the evolution of parameter values across Gibbs sampling iterations. It helps to diagnose the convergence and mixing of the chains.
## S3 method for class 'cat_gibbs'
traceplot(object, pars = NULL, inc_warmup = FALSE, ...)
object |
A fitted model object of class |
pars |
A character vector specifying the parameter names to plot.
If |
inc_warmup |
A logical value indicating whether to include warmup iterations
in the traceplot. If |
... |
Additional parameters to pass to other functions. |
The function generates a series of line plots for the selected parameters,
displaying their values over the iterations of the Gibbs sampling process.
If inc_warmup
is set to TRUE
, the traceplot includes the warmup period,
otherwise, it starts after the warmup. The traceplots are arranged in a 3x3 grid,
and no more than 9 parameters can be selected for plotting at once.
A series of traceplots for the selected parameters, showing their evolution over the Gibbs sampling iterations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.