ComputeHDI: Compute HDI

Description Usage Arguments Details Value Examples

Description

Compute highest density interval (HDI) from posterior output

Usage

1
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

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

bfw documentation built on May 2, 2019, 6:51 a.m.