powered by
Computes the highest density interval for the difference of two beta distributions.
hd.diffbetas(c1, d1, c2, d2, rho = NULL, len = NULL, N = 1000)
Lower and upper bounds of the HD interval.
First parameter of the beta distribution of the first proportion.
Second parameter of the beta distribution of the first proportion.
First parameter of the beta distribution of the second proportion.
Second parameter of the beta distribution of the second proportion.
A number in (0, 1) representing the fixed probability for the HD interval.
A positive real number representing the fixed length for the HD interval.
Number of replicates used in the simulation. Default is 1000.
M’Lan, C.E., Joseph, L., Wolfson, D.B. (2006). Bayesian sample size determination for case-control studies. Journal of the American Statistical Association, 101, 760–772.
hd.diffbetas(c1 = 8, d1 = 2, c2 = 2, d2 = 8, rho = 0.95) hd.diffbetas(c1 = 8, d1 = 2, c2 = 2, d2 = 8, len = 0.2)
Run the code above in your browser using DataLab