Description Arguments Value Details Notes Author(s)
Calculate Highest Posterior Density (HPD) intervals for samples.
object |
The object containing the samples. |
prob |
A numeric scalar in the interval (0,1) giving the target probability content of the intervals. The nominal probability content of the intervals is the multiple of 1/nrow(obj) nearest to prob. |
... |
Optional additional arguments for methods. |
An object of class HPD
(extends
matrix).
For each parameter the interval is constructed from the empirical cdf of the sample as the shortest interval for which the difference in the ecdf values of the endpoints is the nominal probability. Assuming that the distribution is not severely multimodal, this is the HPD interval.
This function was adapted from the function
HPDinterval
in the coda
package.
Douglas Bates, Jeffrey Arnold
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.