NAG Library Routine Document
G01GDF returns the probability associated with the lower tail of the noncentral or variance-ratio distribution, via the routine name.
|REAL (KIND=nag_wp) G01GDF
||F, DF1, DF2, RLAMDA, TOL
The lower tail probability of the noncentral
degrees of freedom and noncentrality parameter
, is defined by
is the beta function.
The probability is computed by means of a transformation to a noncentral beta distribution:
is the lower tail probability integral of the noncentral beta distribution with parameters
If is very large, greater than , then a approximation is used.
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
- 1: F – REAL (KIND=nag_wp)Input
On entry: , the deviate from the noncentral -distribution.
- 2: DF1 – REAL (KIND=nag_wp)Input
On entry: the degrees of freedom of the numerator variance, .
- 3: DF2 – REAL (KIND=nag_wp)Input
On entry: the degrees of freedom of the denominator variance, .
- 4: RLAMDA – REAL (KIND=nag_wp)Input
On entry: , the noncentrality parameter.
is the safe range parameter as defined by X02AMF
- 5: TOL – REAL (KIND=nag_wp)Input
: the relative accuracy required by you in the results. If G01GDF is entered with TOL
greater than or equal to
or less than
), then the value of
is used instead.
- 6: MAXIT – INTEGERInput
On entry: the maximum number of iterations to be used.
. See G01GCF
for further details.
- 7: 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: G01GDF may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the routine:
If on exit or , then G01GDF returns .
|or||, where safe range parameter as defined by X02AMF.|
The solution has failed to converge in MAXIT
iterations. You should try a larger value of MAXIT
The required probability cannot be computed accurately. This may happen if the result would be very close to
. Alternatively the values of DF1
may be too large. In the latter case you could try using a normal approximation; see Abramowitz and Stegun (1972)
The required accuracy was not achieved when calculating the initial value of the central
) probability. You should try a larger value of TOL
. If the
approximation is being used then G01GDF returns zero otherwise the value returned should be an approximation to the correct value.
The relative accuracy should be as specified by TOL
. For further details see G01GCF
are large a Normal approximation may be used and when only
is large a
approximation may be used. In both cases
is required to be of the same order as
. See Abramowitz and Stegun (1972)
for further details.
This example reads values from, and degrees of freedom for, -distributions, computes the lower tail probabilities and prints all these values until the end of data is reached.
9.1 Program Text
Program Text (g01gdfe.f90)
9.2 Program Data
Program Data (g01gdfe.d)
9.3 Program Results
Program Results (g01gdfe.r)