Description Usage Arguments Details Value Author(s) See Also Examples
beta.ratio(a,b,x,y) = beta(a,b)/beta(x,y), where beta(a,b)=(gamma(a)*gamma(b))/gamma(a+b)
1 | beta.ratio(a, b, x, y)
|
a |
a numeric object |
b |
a numeric object |
x |
a numeric object |
y |
a numeric object |
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)!}
a numeric value representing the ratio of two beta functions
Michael P. Fay
1 2 3 4 5 6 | ### The following equals 1001/1000=1.001
beta.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)
|
[1] 1.001001
[1] NaN
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.