phyperIbeta | R Documentation |
Pearson's incomplete Beta function approximation to the cumulative
hyperbolic distribution function phyper(.)
.
Note that in R, pbeta()
provides a version of the
incomplete Beta function.
phyperIbeta(q, m, n, k)
q |
vector of quantiles representing the number of white balls drawn without replacement from an urn which contains both black and white balls. |
m |
the number of white balls in the urn. |
n |
the number of black balls in the urn. |
k |
the number of balls drawn from the urn, hence must be in
|
a numeric vector “like” q
with values approximately equal
to phyper(q,m,n,k)
.
Martin Maechler
Johnson, Kotz & Kemp (1992): (6.90), p.260 –> Bol'shev (1964)
phyper
.
## The function is currently defined as
function (q, m, n, k)
{
Np <- m
N <- n + m
n <- k
x <- q
p <- Np/N
np <- n * p
xi <- (n + Np - 1 - 2 * np)/(N - 2)
d.c <- (N - n) * (1 - p) + np - 1
cc <- n * (n - 1) * p * (Np - 1)/((N - 1) * d.c)
lam <- (N - 2)^2 * np * (N - n) * (1 - p)/((N - 1) * d.c *
(n + Np - 1 - 2 * np))
pbeta(1 - xi, lam - x + cc, x - cc + 1)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.