Learn R Programming

brms (version 1.1.0)

plot.brmsfit: Trace and Density Plots for MCMC Samples

Description

Trace and Density Plots for MCMC Samples

Usage

"plot"(x, pars = NA, parameters = NA, N = 5, theme = ggplot2::theme(), ask = TRUE, plot = TRUE, newpage = TRUE, ...)

Arguments

x
An object of class brmsfit.
pars
Names of the parameters to plot, as given by a character vector or a regular expression. By default, all parameters except for random effects are plotted.
parameters
A deprecated alias of pars
N
The number of parameters plotted per page.
theme
A theme object modifying the appearance of the plots. For some basic themes see ggtheme. Can be defined globally for the current session, via theme_set.
ask
logical; indicates if the user is prompted before a new page is plotted. Only used if plot is TRUE.
plot
logical; indicates if plots should be plotted directly in the active graphic device. Defaults to TRUE.
newpage
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 arrangeGrob.

Value

A (possibly invisible) list of gtable objects.

Examples

Run this code
## Not run:  
# fit <- brm(count ~ log_Age_c + log_Base4_c * Trt_c 
#            + (1|patient) + (1|visit), 
#            data = epilepsy, family = "poisson")
# ## plot fixed effects as well as standard devations of the random effects
# plot(fit)
# ## plot fixed effects only
# plot(fit, pars = "^b_") 
# ## End(Not run)

Run the code above in your browser using DataLab