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/
HDIofMCMC(sampleVec, credMass = 0.95)
A vector of representative values from a probability distribution (e.g., MCMC samples).
A scalar between 0 and 1, indicating the mass within the credible interval that is to be estimated.
A vector containing the limits of the HDI
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.