posterior_interval: Posterior uncertainty intervals

View source: R/posterior_intervals.R

posterior_intervalR Documentation

Posterior uncertainty intervals

Description

The posterior_interval function computes Bayesian posterior uncertainty intervals. These intervals are often referred to as credible intervals, for more details see rstanarm.

Usage

posterior_interval(mat, prob = 0.9, ...)

Arguments

mat

a matrix containing the posterior samples of a fitted parameter.

prob

A number p \in (0,1) indicating the desired probability mass to include in the intervals. The default is to report 90% intervals (prob=0.9) rather than the traditionally used 95%.

...

Further arguments passed to posterior_intervals.

Value

A matrix with two columns and as many rows as model parameters (or the subset of parameters specified by pars and/or regex_pars). For a given value of prob, p, the columns correspond to the lower and upper 100*p% interval limits and have the names 100\alpha/2 and 100(1 - \alpha/2)%, where \alpha = 1-p. For example, if prob=0.9 is specified (a 90% interval), then the column names will be "5%" and "95%", respectively.

Author(s)

Asael Alonzo Matamoros


bayesforecast documentation built on June 8, 2025, 10:42 a.m.