double StudentRangeCDFInv(const double p, const int r, const int v, const int ci = 1);
Inverse cumulative probability (PPF / quantile) for the Studentized Range distribution.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | p | const double | The cumulative probability (percentile), 0 < p < 1. |
| 2 | r | const int | Number of samples (groups), integer r>=2. |
| 3 | v | const int | Degrees of freedom, integer v>=1. To obtain the maximum normal range distribution (v = Inf), specify this parameter larger than 25000. |
| 4 | ci = 1 | const int | If ci = 1, the inverse cumulative probability of the studentized range is returned. If ci > 1 (e.g. 2), the inverse studentized maximum modulus distribution is obtained. |
Returns: the quantile q such that StudentRangeCDF(q,r,v,ci)=p, for r groups and v degrees of freedom. Returns 0 for p<=0 and NaN if r<2 or v<1.
The percent point function is the inverse of the studentized range CDF:
CDFInv(p | r,v) = F^(-1)(p | r,v) where F(q | r,v)=StudentRangeCDF(q,r,v)=p .
It is computed by Newton-type iteration on the AS 190 CDF. Returns NaN for r<2 or v<1. Note: the maximum allowed p when v = 1 is 0.98; accuracy decreases as r grows, as v shrinks, and as p approaches 1. It is recommended to verify the result with StudentRangeCDF to ensure the value of p can be recovered.
References:
[1] Based on Fortran program from statlib, http://lib.stat.cmu.edu, Algorithm AS 190 Appl. Statist. (1983) Vol.32, No. 2 Incorporates corrections from Appl. Statist. (1985) Vol.34 (1) [2] Ferreira, D., et al. "Quantiles from the Maximum Studentized Range Distribution." Biometric Brazilian Journal 25.1 (2007): 117-135. http://jaguar.fcav.unesp.br/RME/fasciculos/v25/v25_n1/A8_Daniel.pdf (See prange function)