beta.ratio: Calculation Ratio of two Beta functions
Description
beta.ratio(a,b,x,y) = beta(a,b)/beta(x,y), where beta(a,b)=(gamma(a)*gamma(b))/gamma(a+b)
Usage
beta.ratio(a, b, x, y)
Value
a numeric value representing the ratio of two beta functions
Arguments
a
a numeric object
b
a numeric object
x
a numeric object
y
a numeric object
Author
Michael P. Fay
Details
The function was created to avoid underflow problems when both beta(a,b) and beta(x,y) are very small.
Recall for integers i and j, beta(i+1,j+1) = \( \frac{(i!j!)}{(i+j+1)!}\)
### The following equals 1001/1000=1.001beta.ratio(999,1001,1000,1000)
### does not get the answer exactly correct## but it is better than## the following beta(999,1001)/beta(1000,1000)