Learn R Programming

brms (version 0.5.0)

plot.brmsfit: Trace and density plots for MCMC samples

Description

Trace and density plots for MCMC samples

Usage

## S3 method for class 'brmsfit':
plot(x, parameters = NA, N = 5, ask = TRUE, ...)

Arguments

x
An object of class brmsfit.
parameters
Name of the parameters to plot, as given by a character vector or a regular expression. By default, all parameters except for random effects, posterior predictives, and log likelihood values are plotted.
N
The number of parameters plotted per page.
ask
logical; Indicates if the user is prompted before a new page is plotted.
...
Further arguments passed to arrangeGrob.

Examples

Run this code
fit_e <- 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_e)
## plot fixed effects only and combine the chains into one posterior
plot(fit_e, parameters = "^b_", combine = TRUE)

Run the code above in your browser using DataLab