powered by
This is a wrapper for hdrcde::hdr. The highest density region is the interval that covers conf_level of the data and has the highest average density. See:
hdrcde::hdr
conf_level
dist_hdr(dist, conf_level, bounds = attr(dist, "limits"))
A one-argument function
A scalar between 0 and 1
A length 2 vector of the bounds of the distribution's support
A length 2 vector of region endpoints
Rob J Hyndman (1996) <U+201C>Computing and graphing highest density regions<U+201D>. American Statistician, 50, 120-126.
# NOT RUN { d1 <- update_prior(33, 50, P = 0.5, prior = stats::dunif) dist_hdr(d1, 0.95) # }
Run the code above in your browser using DataLab