Skip to contents

Computes the shortest credible interval within which an unobserved parameter value falls with a particular probability.

Usage

interval_credible(x, ...)

# S4 method for class 'numeric'
interval_credible(x, level = 0.95)

Arguments

x

A numeric vector.

...

Currently not used.

level

A length-one numeric vector giving the confidence level.

Value

A three-columns numeric matrix giving the lower and upper boundaries of the credible interval and associated probability.

See also

Author

N. Frerebeau

Examples

## HDR of the Old Faithful eruption times
interval_hdr(faithful$eruptions)
#>         start      end    p
#> [1,] 1.307160 2.837942 0.33
#> [2,] 3.150567 5.295819 0.62