Computes the smallest interval containing the specified probability mass for a given sample.
Arguments
- sample
A numeric vector representing the sample data.
- prob
A numeric value between 0 and 1 specifying the desired probability mass. Defaults to 0.95.
Value
A numeric vector of length 2 indicating the lower and upper bounds of the HDI.