hpd_interval-methods: Highest Posterior Density Interval

Description Arguments Value Details Notes Author(s)

Description

Calculate Highest Posterior Density (HPD) intervals for samples.

Arguments

object

The object containing the samples.

prob

A numeric scalar in the interval (0,1) giving the target probability content of the intervals. The nominal probability content of the intervals is the multiple of 1/nrow(obj) nearest to prob.

...

Optional additional arguments for methods.

Value

An object of class HPD (extends matrix).

Details

For each parameter the interval is constructed from the empirical cdf of the sample as the shortest interval for which the difference in the ecdf values of the endpoints is the nominal probability. Assuming that the distribution is not severely multimodal, this is the HPD interval.

Notes

This function was adapted from the function HPDinterval in the coda package.

Author(s)

Douglas Bates, Jeffrey Arnold


jrnold/mcmcStats documentation built on May 20, 2019, 1:03 a.m.