Highest Density Regions
Usage
interval_hdr(x, y, ...)
# S4 method for class 'numeric,numeric'
interval_hdr(x, y, level = 0.954)
# S4 method for class 'numeric,missing'
interval_hdr(x, level = 0.954, ...)Arguments
- x
- A - numericvector giving the coordinates of the points where the density is estimated.
- y
- A - numericvector giving the estimated density values. If- yis missing and- xis a- numericvector, density estimates will be computed from- x.
- ...
- Further arguments to be passed to - stats::density().
- level
- A length-one - numericvector giving the confidence level.
Value
A three-columns numeric matrix giving the lower and upper boundaries
of the HPD interval and associated probabilities.
References
Hyndman, R. J. (1996). Computing and graphing highest density regions. American Statistician, 50: 120-126. doi:10.2307/2684423 .
See also
Other summary statistics:
confidence_binomial(),
confidence_bootstrap(),
confidence_mean(),
confidence_multinomial(),
interval_credible()
