
Trace and Density Plots for MCMC Samples
# S3 method for brmsfit
plot(x, pars = NA, combo = c("dens", "trace"),
N = 5, exact_match = FALSE, theme = NULL, plot = TRUE,
ask = TRUE, newpage = TRUE, ...)
An object of class brmsfit
.
Names of the parameters to plot, as given by a character vector or a regular expression. By default, all parameters except for group-level and smooth effects are plotted.
A character vector with at least two elements.
Each element of combo
corresponds to a column in the resulting
graphic and should be the name of one of the available
MCMC
functions
(omitting the mcmc_
prefix).
The number of parameters plotted per page.
Indicates whether parameter names
should be matched exactly or treated as regular expression.
Default is FALSE
.
A theme
object
modifying the appearance of the plots.
For some basic themes see ggtheme
and theme_default
.
logical; indicates if plots should be
plotted directly in the active graphic device.
Defaults to TRUE
.
logical; indicates if the user is prompted
before a new page is plotted.
Only used if plot
is TRUE
.
logical; indicates if the first set of plots
should be plotted to a new page.
Only used if plot
is TRUE
.
Further arguments passed to
mcmc_combo
.
An invisible list of
gtable
objects.
# NOT RUN {
fit <- brm(count ~ zAge + zBase * Trt
+ (1|patient) + (1|visit),
data = epilepsy, family = "poisson")
plot(fit)
## plot population-level effects only
plot(fit, pars = "^b_")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab