| plot_mcmc_trace | R Documentation |
The functions provide visualizations of MCMC results obtained for
drift_dm() objects. Users won't call the functions directly.
Instead, they are called via plot.mcmc_dm(), and the
following documentation helps to define optional arguments that can be
passed on via ....
plot_mcmc_trace(
chains,
col_palette = grDevices::rainbow,
col_chains = NULL,
which_prms = NULL,
xlab = NULL,
ylab = NULL,
xlim = NULL,
ylim = NULL
)
plot_mcmc_marginal(
chains,
col_line = NULL,
col_shade = NULL,
which_prms = NULL,
xlab = NULL,
ylab = NULL,
xlim = NULL,
ylim = NULL
)
plot_mcmc_auto(
chains,
lags = 1:30,
col_line = NULL,
which_prms = NULL,
xlab = NULL,
ylab = NULL,
xlim = NULL,
ylim = NULL,
type = NULL,
main = NULL
)
chains |
an array of MCMC samples with three dimensions
(parameters × chains × iterations; see also |
col_palette |
a function to generate a color palette for chains
(default is grDevices::rainbow). Must be callable like this
|
col_chains |
a character vector, defining colors(s) to override
|
which_prms |
a regular expression (string), used to select a subset
of parameters to plot. For example, |
xlab, ylab |
character vector(s), specifying axis labels for each panel. Recycled if necessary to match the number of plots being generated. |
xlim, ylim |
list(s), containing length-2 numeric vectors specifying x- and y-axis limits, respectively. Recycled if necessary to match the number of plots being generated. |
col_line |
a character vector, defining color(s) for the line outlines in the density plots. Can be a single value or a vector matching the number of parameters to plot. Recycled if necessary to match the number of parameters being plotted. |
col_shade |
a character vector, defining color(s) for the shaded areas in the density plots. Can be a single value or a vector matching the number of parameters to plot. Recycled if necessary to match the number of parameters being plotted. |
lags |
a numeric vector, giving the lags at which to calculate
autocorrelation (see also |
type |
a character, specifying how autocorrelations shall be displayed.
Defaults to "h" (see the |
main |
character vector, specifying the labels above each autocorrelation plot. Defaults to parameter labels. Recycled if necessary to match the number of parameters being plotted. |
plot_mcmc_trace() plots one panel per parameter, with lines for each
chain showing how values evolve over iterations. This is useful for
diagnosing convergence and mixing.
plot_mcmc_marginal() plots smoothed marginal posterior densities
collapsed over chains and iterations for each parameter, useful for
inspecting posterior distributions.
plot_mcmc_auto() plots the autocorrelation among samples as function
of lags.
These functions are called for their side effects (producing plots).
They return NULL invisibly.
plot.mcmc_dm()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.