NAG Library Routine Document
G01ECF returns the lower or upper tail probability for the -distribution with real degrees of freedom, via the routine name.
|REAL (KIND=nag_wp) G01ECF
The lower tail probability for the
degrees of freedom,
is defined by:
a transformation of a gamma distribution is employed, i.e., a
degrees of freedom is equal to a gamma distribution with scale parameter
and shape parameter
Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications
Hastings N A J and Peacock J B (1975) Statistical Distributions Butterworth
- 1: TAIL – CHARACTER(1)Input
: indicates whether the upper or lower tail probability is required.
- The lower tail probability is returned, i.e., .
- The upper tail probability is returned, i.e., .
- 2: X – REAL (KIND=nag_wp)Input
On entry: , the value of the variate with degrees of freedom.
- 3: DF – REAL (KIND=nag_wp)Input
On entry: , the degrees of freedom of the -distribution.
- 4: 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: G01ECF 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 G01ECF returns .
|On entry,|| or .|
The solution has failed to converge while calculating the gamma variate. The result returned should represent an approximation to the solution.
A relative accuracy of five significant figures is obtained in most cases.
For higher accuracy the transformation described in Section 3
may be used with a direct call to S14BAF
Values from various -distributions are read, the lower tail probabilities calculated, and all these values printed out, until the end of data is reached.
9.1 Program Text
Program Text (g01ecfe.f90)
9.2 Program Data
Program Data (g01ecfe.d)
9.3 Program Results
Program Results (g01ecfe.r)