Convenient way to call MCMC plotting functions implemented in the bayesplot package for mvgam models
# S3 method for mvgam
mcmc_plot(
object,
type = "intervals",
variable = NULL,
regex = FALSE,
use_alias = TRUE,
...
)
A ggplot
object
that can be further customized using the ggplot2 package.
An R object typically of class brmsfit
The type of the plot.
Supported types are (as names) hist
, dens
,
hist_by_chain
, dens_overlay
,
violin
, intervals
, areas
,
areas_ridges
, combo
, acf
,
acf_bar
, trace
, trace_highlight
,
scatter
, hex
, pairs
, violin
,
rhat
, rhat_hist
, neff
, neff_hist
and nuts_energy
.
For an overview on the various plot types see
MCMC-overview
.
Names of the variables (parameters) to plot, as given by a
character vector or a regular expression (if regex = TRUE
). By
default, a hopefully not too large selection of variables is plotted.
Logical; Indicates whether variable
should
be treated as regular expressions. Defaults to FALSE
.
Logical. If more informative names for parameters are available
(i.e. for beta coefficients b
or for smoothing parameters rho
), replace the uninformative
names with the more informative alias. Defaults to TRUE
Additional arguments passed to the plotting functions.
See MCMC-overview
for
more details.
mvgam_draws
for an overview of some of the shortcut strings
that can be used for argument variable
# \donttest{
simdat <- sim_mvgam(n_series = 1, trend_model = AR())
mod <- mvgam(y ~ s(season, bs = 'cc', k = 6),
trend_model = AR(),
noncentred = TRUE,
data = simdat$data_train,
chains = 2,
silent = 2)
mcmc_plot(mod)
mcmc_plot(mod, type = 'neff_hist')
mcmc_plot(mod, variable = 'betas', type = 'areas')
mcmc_plot(mod, variable = 'trend_params', type = 'combo')
# }
Run the code above in your browser using DataLab