Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

posterior_interval.brmsfit

Compute posterior uncertainty intervals


Description

Compute posterior uncertainty intervals for brmsfit objects.

Usage

## S3 method for class 'brmsfit'
posterior_interval(object, pars = NA, prob = 0.95, ...)

Arguments

object

An object of class brmsfit.

pars

Names of parameters for which posterior samples should be returned, as given by a character vector or regular expressions. By default, all posterior samples of all parameters are extracted.

prob

A value between 0 and 1 indicating the desired probability to be covered by the uncertainty intervals. The default is 0.95.

...

More arguments passed to as.matrix.brmsfit.

Value

A matrix with lower and upper interval bounds as columns and as many rows as selected parameters.

Examples

## Not run: 
fit <- brm(count ~ zAge + zBase * Trt,
           data = epilepsy, family = negbinomial())
posterior_interval(fit)

## End(Not run)

brms

Bayesian Regression Models using 'Stan'

v2.15.0
GPL-2
Authors
Paul-Christian Bürkner [aut, cre], Jonah Gabry [ctb], Sebastian Weber [ctb], Andrew Johnson [ctb], Martin Modrak [ctb]
Initial release
2021-03-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.