hpd.overlap | R Documentation |
Checks whether any of the highest posterior densities (hpds) of two distributions overlap.
hpd.overlap(distA, distB, prob = 0.95)
distA |
Distribution A. Expects two columns: values and their probabilities (e.g., caldist(130,10, cc=1)). |
distB |
Distribution B. Expects two columns: values and their probabilities (e.g., caldist(130,10, cc=1)). |
prob |
The probability of the highest posterior densities. Defaults to 95%. |
TRUE if at least one of the hpds of distA overlaps with that of distB.
distA <- caldist(130, 20, cc=0) # normal distribution
distB <- caldist(130, 20, cc=1) # calibrated distribution
plot(distB, type="l")
lines(distA, col=2)
hpd.overlap(distA, distB)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.