Learn R Programming

rethinking (version 1.35)

HPDI: Confidence/credible intervals from samples

Description

These functions compute highest posterior density (HPDI) and percentile (PCI) confidence intervals, using samples from the posterior density.

Usage

HPDI( samples , prob=0.95 )
PCI( samples , prob=0.95 )

Arguments

samples

Vector of parameter values

prob

interval probability mass

Value

Details

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

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

References

McElreath 2011, Statistical Rethinking.

See Also

HPDinterval