Learn R Programming

brms (version 0.6.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, pars = NA, parameters = NA, N = 5, ask = 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.
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, pars = "^b_", combine = TRUE)

Run the code above in your browser using DataLab