HPDI: Confidence/credible intervals from samples

View source: R/utilities.r

HPDIR Documentation

Confidence/credible intervals from samples

Description

These functions compute highest posterior density (HPDI) and percentile (PI) intervals, using samples from a posterior density or simulated outcomes.

Usage

HPDI( samples , prob=0.89 )
PI( samples , prob=0.89 )

Arguments

samples

Vector of parameter values

prob

interval probability mass

Details

Highest Posterior Density Intervals (HPDI) are calculated by HPDinterval in the coda package.

Percentile intervals (PI) use quantile and assign equal mass to each tail.

Author(s)

Richard McElreath

See Also

HPDinterval


rmcelreath/rethinking documentation built on Aug. 26, 2024, 5:54 p.m.