Description Usage Arguments Details Value Author(s) References Examples
This function calculates the Bayesian highest posterior density interval (HPD) based on a parameters' posterior sample.
1 |
sample |
A vector representing draws from the target distribution of the paramter of interest, as produced by the main function |
cred_int |
The desired accuracy of the HPD. Default value is 0.95 for 95%. |
The highest posterior density interval (HPD, see e.g. Box & Tia, 1992) contains the required mass such that all points within the interval have a higher probability density than points outside of the interval.
The function expects as input a vector representing draws from the target distribution of the paramter of interest, such as produced by the main function IRT_twin
of this package.
The result is a vector consisiting of two values, the first value representing the lower bound of the HPD and the second value representing the upper bound.
A vector of length 2 with the lower (first value) and upper (second value) bound of the HPD.
Inga Schwabe
Box, G., & Tiao, G. (1992). Bayesian inference in statistical analysis. New York: John Wiley & Sons.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.