Learn R Programming

psycho (version 0.0.8)

hdi: Highest Density Intervals (HDI).

Description

Compute the Highest Density Intervals (HDI) of a distribution.

Usage

hdi(x, prob = 0.95)

Arguments

x

A vector of values from a probability distribution (e.g., posterior probabilities from MCMC sampling).

prob

Scalar between 0 and 1, indicating the mass within the credible interval that is to be estimated.