powered by
Checks whether any of the highest posterior densities (hpds) of two distributions overlap.
hpd.overlap(distA, distB, prob = 0.95)
TRUE if at least one of the hpds of distA overlaps with that of distB.
Distribution A. Expects two columns: values and their probabilities (e.g., caldist(130,10, cc=1)).
Distribution B. Expects two columns: values and their probabilities (e.g., caldist(130,10, cc=1)).
The probability of the highest posterior densities. Defaults to 95%.
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)
Run the code above in your browser using DataLab