predictive_interval.brmsfit: Predictive Intervals

Description Usage Arguments Value Examples

View source: R/posterior_predict.R

Description

Compute intervals from the posterior predictive distribution.

Usage

1
2
## 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

1
2
3
4
5
## Not run: 
fit <- brm(count ~ zBase, data = epilepsy, family = poisson())
predictive_interval(fit)

## End(Not run)

brms documentation built on Aug. 23, 2021, 5:08 p.m.