50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

hBayesDM (version 1.2.1)

HDIofMCMC: Compute Highest-Density Interval

Description

Computes the highest density interval from a sample of representative values, estimated as shortest credible interval. Based on John Kruschke's codes.

Usage

HDIofMCMC(sampleVec, credMass = 0.95)

Value

A vector containing the limits of the HDI

Arguments

sampleVec

A vector of representative values from a probability distribution (e.g., MCMC samples).

credMass

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