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

predictive_interval.brmsfit

Predictive Intervals


Description

Compute intervals from the posterior predictive distribution.

Usage

## S3 method for class 'brmsfit'
predictive_interval(object, prob = 0.9, ...)

Arguments

object

An R object of class brmsfit.

prob

A number p (0 < p < 1) indicating the desired probability mass to include in the intervals. Defaults to 0.9.

...

Further arguments passed to posterior_predict.

Value

A matrix with 2 columns for the lower and upper bounds of the intervals, respectively, and as many rows as observations being predicted.

Examples

## Not run: 
fit <- brm(count ~ zBase, data = epilepsy, family = poisson())
predictive_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.