compare_dists {truelies} | R Documentation |
Calculate probability that one posterior is larger than another
Description
Given two distributions with density functions \phi_1, \phi_2
,
this calculates:
\int_0^1 \int_0^{l_1}\phi_1(l_1) \phi_2(l_2) d l_2 d l_1,
the probability that the value of the first distribution is greater.
Usage
compare_dists(dist1, dist2)
Arguments
dist1 |
Density of distribution 1, as a one-argument function. |
dist2 |
Density of distribution 2. |
Value
A probability scalar.
Examples
d1 <- update_prior(30, 50, P = 0.5, prior = stats::dunif)
d2 <- update_prior(25, 40, P = 0.5, prior = stats::dunif)
compare_dists(d1, d2)
[Package truelies version 0.2.0 Index]