ComputeHDI {bfw}R Documentation

Compute HDI

Description

Compute highest density interval (HDI) from posterior output

Usage

ComputeHDI(data, credible.region)

Arguments

data

data to compute HDI from

credible.region

summarize uncertainty by defining a region of most credible values (e.g., 95 percent of the distribution), Default: 0.95

Details

values within the HDI have higher probability density than values outside the HDI, and the values inside the HDI have a total probability equal to the credible region (e.g., 95 percent).

Value

Return HDI

Examples

set.seed(1)
data <-rnorm(100,0,1)
credible.region <- 0.95
ComputeHDI(data,credible.region)
# HDIlo HDIhi
# -1.99 1.60

[Package bfw version 0.4.2 Index]