Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

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.

Value

A vector containing the limits of the HDI


hBayesDM

Hierarchical Bayesian Modeling of Decision-Making Tasks

v1.1.1
GPL-3
Authors
Woo-Young Ahn [aut, cre], Nate Haines [aut], Lei Zhang [aut], Harhim Park [ctb], Jaeyeong Yang [ctb], Jethro Lee [ctb]
Initial release
2021-05-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.