phyperIbeta: Pearson's incomplete Beta Approximation to the Hyperbolic...

View source: R/hyper-dist.R

phyperIbetaR Documentation

Pearson's incomplete Beta Approximation to the Hyperbolic Distribution

Description

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.

Usage

phyperIbeta(q, m, n, k)

Arguments

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 0,1,\dots, m+n.

Value

a numeric vector “like” q with values approximately equal to phyper(q,m,n,k).

Author(s)

Martin Maechler

References

Johnson, Kotz & Kemp (1992): (6.90), p.260 –> Bol'shev (1964)

See Also

phyper.

Examples

## 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)
  }

DPQ documentation built on Sept. 11, 2024, 8:37 p.m.