Bayesian tools
Utils.HPDregions — Function
HPDregions(data::AbstractArray, coverage)Compute the highest posterior density (HPD) regions based on a kernel density estimate of the data.
coverage ∈ (0,1) is the probability mass to be included in the HPD region.
Examples
julia> hpdregion, actualCoverage = HPDregions(randn(100), 0.95)HPDregions(d::UnivariateDistribution, coverage)Compute the highest posterior density (HPD) regions for the distribution d.
coverage ∈ (0,1) is the probability mass to be included in the HPD region.
Examples
julia> hpdregion, actualCoverage = HPDregions(Normal(0,1), 0.95)