HDIofMCMC: Compute Highest-Density Interval

Description Usage Arguments Value

View source: R/HDIofMCMC.R

Description

Computes the highest density interval from a sample of representative values, estimated as shortest credible interval. Downloaded from John Kruschke's website http://www.indiana.edu/~kruschke/DoingBayesianDataAnalysis/

Usage

1
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 documentation built on Sept. 12, 2018, 1:04 a.m.