| MCMC-combos {bayesplot} | R Documentation |
Combination plots
mcmc_combo(x, combo = c("dens", "trace"), widths = NULL, gg_theme = NULL,
...)
x |
A 3-D array, matrix, list of matrices, or data frame of MCMC draws. The MCMC-overview page provides details on how to specify each these allowed inputs. |
combo |
A character vector with at least two elements. Each element of
|
widths |
A numeric vector the same length as |
gg_theme |
Unlike most of the other bayesplot functions,
|
... |
Arguments passed to the plotting functions named in |
A gtable object (the result of calling
arrangeGrob) with length(combo) columns and
a row for each parameter.
Other MCMC: MCMC-diagnostics,
MCMC-distributions,
MCMC-intervals, MCMC-nuts,
MCMC-overview, MCMC-parcoord,
MCMC-recover,
MCMC-scatterplots,
MCMC-traces
# some parameter draws to use for demonstration
x <- example_mcmc_draws()
dim(x)
dimnames(x)
mcmc_combo(x, pars = c("alpha", "sigma"))
mcmc_combo(x, pars = c("alpha", "sigma"), widths = c(1, 2))
# change second plot, show log(sigma) instead of sigma,
# and remove the legends
color_scheme_set("mix-blue-red")
mcmc_combo(
x,
combo = c("dens_overlay", "trace"),
pars = c("alpha", "sigma"),
transformations = list(sigma = "log"),
gg_theme = legend_none()
)
# same thing but this time also change the entire ggplot theme
mcmc_combo(
x,
combo = c("dens_overlay", "trace"),
pars = c("alpha", "sigma"),
transformations = list(sigma = "log"),
gg_theme = ggplot2::theme_gray() + legend_none()
)