
Last chance! 50% off unlimited learning
Sale ends in
Trace and Density Plots for MCMC Draws
# S3 method for brmsfit
plot(
x,
pars = NA,
combo = c("hist", "trace"),
nvariables = 5,
N = NULL,
variable = NULL,
regex = FALSE,
fixed = FALSE,
bins = 30,
theme = NULL,
plot = TRUE,
ask = TRUE,
newpage = TRUE,
...
)
An invisible list of
gtable
objects.
An object of class brmsfit
.
Deprecated alias of variable
.
Names of the parameters to plot, as given by a
character vector or a regular expression.
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 variables (parameters) plotted per page.
Deprecated alias of nvariables
.
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
.
(Deprecated) Indicates whether parameter names
should be matched exactly (TRUE
) or treated as
regular expressions (FALSE
). Default is FALSE
and only works with argument pars
.
Number of bins used for posterior histograms (defaults to 30).
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
.
if (FALSE) {
fit <- brm(count ~ zAge + zBase * Trt
+ (1|patient) + (1|visit),
data = epilepsy, family = "poisson")
plot(fit)
## plot population-level effects only
plot(fit, variable = "^b_", regex = TRUE)
}
Run the code above in your browser using DataLab