We examine the problem of computing the highest density region (HDR) in a computational context where the user has access to a density function and quantile function for the distribution (e.g., in the statistical language R). We examine several common classes of continuous univariate distributions based on the shape of the density function; this includes monotone densities, quasi-concave and quasi-convex densities, and general multimodal densities. In each case we show how the user can compute the HDR from the quantile and density functions by framing the problem as a nonlinear optimisation problem. We implement these methods in R to obtain general functions to compute HDRs for classes of distributions, and for commonly used families of distributions. We compare our method to existing R packages for computing HDRs and we show that our method performs favourably in terms of both accuracy and average speed.
翻译:我们研究在计算环境中计算最高密度区域(HDR)的问题,因为用户可以使用密度函数和定量函数进行分布(例如,统计语言R)。我们根据密度函数的形状来审查连续单体分布的若干共同类别;这包括单体密度、准混凝土和准混凝土密度,以及一般多式联运密度。我们在每个案例中都显示用户如何通过将问题描述为非线性优化问题,从量性和密度函数中计算《人类发展报告》。我们在R中采用这些方法,以获得一般功能来计算发行类别和常用的分布型的《人类发展报告》。我们将我们的方法与计算《人类发展报告》的现有R包进行比较,并显示我们的方法在准确性和平均速度两方面都表现良好。