hpd function

Empirical Highest Posterior Density Interval

Empirical Highest Posterior Density Interval

Computes the Highest Posterior Density (HPD) interval from a posterior sample. Works only for scalar marginal posteriors.

hpd(x, prob = 0.95)

Arguments

  • x: a univariate or a posterior sample for a scalar parameter.
  • prob: posterior probability content.

Returns

vector of two doubles.

  • Maintainer: Erlis Ruli
  • License: GPL-2
  • Last published: 2018-01-30