NAG Library Routine Document
G01FCF returns the deviate associated with the given lower tail probability of the -distribution with real degrees of freedom, via the routine name.
|REAL (KIND=nag_wp) G01FCF
, associated with the lower tail probability
degrees of freedom is defined as the solution to
is found by using the relationship between a
-distribution and a gamma distribution, i.e., a
degrees of freedom is equal to a gamma distribution with scale parameter
and shape parameter
For very large values of
, greater than
, Wilson and Hilferty's normal approximation to the
is used; see Kendall and Stuart (1969)
Best D J and Roberts D E (1975) Algorithm AS 91. The percentage points of the distribution Appl. Statist. 24 385–388
Hastings N A J and Peacock J B (1975) Statistical Distributions Butterworth
Kendall M G and Stuart A (1969) The Advanced Theory of Statistics (Volume 1) (3rd Edition) Griffin
- 1: P – REAL (KIND=nag_wp)Input
On entry: , the lower tail probability from the required -distribution.
- 2: DF – REAL (KIND=nag_wp)Input
On entry: , the degrees of freedom of the -distribution.
- 3: IFAIL – INTEGERInput/Output
must be set to
. If you are unfamiliar with this parameter you should refer to Section 3.3
in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, because for this routine the values of the output parameters may be useful even if
on exit, the recommended value is
. When the value is used it is essential to test the value of IFAIL on exit.
unless the routine detects an error or a warning has been flagged (see Section 6
6 Error Indicators and Warnings
If on entry
, explanatory error messages are output on the current error message unit (as defined by X04AAF
Note: G01FCF may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the routine:
If , , or on exit, then G01FCF returns .
is too close to
for the result to be calculated.
The solution has failed to converge. The result should be a reasonable approximation.
The series used to calculate the gamma function has failed to converge. This is an unlikely error exit.
The results should be accurate to five significant digits for most parameter values. Some accuracy is lost for close to .
For higher accuracy the relationship described in Section 3
may be used and a direct call to G01FFF
This example reads lower tail probabilities for several -distributions, and calculates and prints the corresponding deviates until the end of data is reached.
9.1 Program Text
Program Text (g01fcfe.f90)
9.2 Program Data
Program Data (g01fcfe.d)
9.3 Program Results
Program Results (g01fcfe.r)