hpd_uni: hpd_uni

Description Usage Arguments See Also Examples

Description

Compute the highest density posterior interval from a (unimodal) sample of points. Unless (slightly) more accurate results for unimodal distributions are deired, the hpd_mult function should be used instead as it runs faster and can handle multiple modes.

Usage

1
hpd_uni(x, prob = 0.95, precision = 1000)

Arguments

x

vector of samples from some distribution

prob

numeric in (0, 1) the probability that the interval should be

precision

numeric, determines how accurate the resulting hpd should be, larger is more precise

See Also

hpd_mult

Examples

1
2
3
x = rnorm(100)
hpd.x = hpd_uni(x)
hpd.x

mickwar/mwBASE documentation built on May 22, 2019, 9:56 p.m.