NAG Library Routine Document
G01GCF returns the probability associated with the lower tail of the noncentral -distribution
via the routine name.
|REAL (KIND=nag_wp) G01GCF
||X, DF, RLAMDA, TOL
The lower tail probability of the noncentral
degrees of freedom and noncentrality parameter
, is defined by
is a central
degrees of freedom.
The value of
at which the Poisson weight,
, is greatest is determined and the summation (1)
is made forward and backward from that value of
The recursive relationship:
is used during the summation in (1)
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
- 1: X – REAL (KIND=nag_wp)Input
On entry: the deviate from the noncentral -distribution with degrees of freedom and noncentrality parameter .
- 2: DF – REAL (KIND=nag_wp)Input
On entry: , the degrees of freedom of the noncentral -distribution.
- 3: RLAMDA – REAL (KIND=nag_wp)Input
On entry: , the noncentrality parameter of the noncentral -distribution.
if or if .
- 4: TOL – REAL (KIND=nag_wp)Input
: the required accuracy of the solution. If G01GCF is entered with TOL
greater than or equal to
or less than
), then the value of
is used instead.
- 5: MAXIT – INTEGERInput
On entry: the maximum number of iterations to be performed.
. See Section 8
for further discussion.
- 6: 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: G01GCF 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 G01GCF returns .
|or|| and ,|
The initial value of the Poisson weight used in the summation (1)
was too small to be calculated. The value of
is likely to be zero.
The solution has failed to converge in MAXIT
The value of a term required in (2)
is too large to be evaluated accurately. The most likely cause of this error is both X
being very large.
The calculations for the central
probability has failed to converge. This is an unlikely error exit. A larger value of TOL
should be used.
The summations described in Section 3
are made until an upper bound on the truncation error relative to the current summation value is less than TOL
The number of terms in (1)
required for a given accuracy will depend on the following factors:
||The rate at which the Poisson weights tend to zero. This will be slower for larger values of .
||The rate at which the central probabilities tend to zero. This will be slower for larger values of and .
This example reads values from various noncentral -distributions, calculates the lower tail probabilities and prints all these values until the end of data is reached.
9.1 Program Text
Program Text (g01gcfe.f90)
9.2 Program Data
Program Data (g01gcfe.d)
9.3 Program Results
Program Results (g01gcfe.r)