ComputeHDI | R Documentation |
Compute highest density interval (HDI) from posterior output
ComputeHDI(data, credible.region)
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 |
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).
Return HDI
set.seed(1) data <-rnorm(100,0,1) credible.region <- 0.95 ComputeHDI(data,credible.region) # HDIlo HDIhi # -1.99 1.60
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.