hypergeoquantile {hypersampleplan} | R Documentation |
Calculation Hypergeometric Quantiles Table using Chebyshev Polynomials
Description
This is an algorithm for efficient and exact calculation of hypergeometric quantiles using Chebyshev polynomials. For a fixed population size N and fixed sample size n, such calculations simultaneously produce quantiles of q for all possible values of the population number of "successes" M.
Usage
hypergeoquantile(q, N, n)
Arguments
q |
probability, it must be between 0 and 1. |
N |
population size N. |
n |
sample size n. |
Details
The detailed algorthim can be found: Alvo, M., & Cabilio, P. (2000). Calculation of hypergeometric probabilities using Chebyshev polynomials. The American Statistician, 54(2), 141-144.
Value
a matrix containing all possible required values of the hypergeometric quantiles for q in row M=0,1,...,N.
Note
N can be very large say 2000 in our algorthim.
References
Alvo, M., & Cabilio, P. (2000). Calculation of hypergeometric probabilities using Chebyshev polynomials. The American Statistician, 54(2), 141-144.
Examples
# Calculate the hypergeometric quantile for q=0.05, N=10, n=5.
hypergeoquantile(0.05,10,5)