Learn R Programming

brms (version 0.3.0)

plot.brmsfit: Trace and density plots for MCMC samples

Description

Trace and density plots for MCMC samples using the ggmcmc package

Usage

## S3 method for class 'brmsfit':
plot(x, parameters = NA, combine = FALSE, 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 and posterior predictives are plotted.
combine
logical; Indicates if the samples of all chains should be combined into one posterior distribution.
N
The number of parameters plotted per page.
ask
logical; Indicates if the user is prompted before a new page is plotted.
...
Currently ignored.

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 and correlations (if present) of 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