The routine may be called by the names g01jdf or nagf_stat_prob_chisq_lincomb.
Let be independent Normal variables with mean zero and unit variance, so that have independent -distributions with unit degrees of freedom. g01jdf evaluates the probability that
If this is equivalent to the probability that
then g01jdf returns the probability that
Two methods are available. One due to Pan (1964) (see Farebrother (1980)) makes use of series approximations. The other method due to Imhof (1961) reduces the problem to a one-dimensional integral. If then a non-adaptive method
described in d01bdf
is used to compute the value of the integral otherwise
Pan's procedure can only be used if the are sufficiently distinct; g01jdf requires the to be at least distinct; see Section 9. If the are at least distinct and , then Pan's procedure is recommended; otherwise Imhof's procedure is recommended.
Farebrother R W (1980) Algorithm AS 153. Pan's procedure for the tail probabilities of the Durbin–Watson statistic Appl. Statist.29 224–227
Imhof J P (1961) Computing the distribution of quadratic forms in Normal variables Biometrika48 419–426
Pan Jie–Jian (1964) Distributions of the noncircular serial correlation coefficients Shuxue Jinzhan7 328–337
1: – Character(1)Input
On entry: indicates whether Pan's, Imhof's or an appropriately selected procedure is to be used.
Pan's method is used.
Imhof's method is used.
Pan's method is used if
, for are at least distinct and ; otherwise Imhof's method is used.
, or .
2: – IntegerInput
On entry: , the number of independent standard Normal variates, (central variates).
3: – Real (Kind=nag_wp) arrayInput
On entry: the weights,
, for , of the central variables.
for at least one . If , the must be at least distinct; see Section 9, for .
4: – Real (Kind=nag_wp)Input
On entry: , the multiplier of the central variables.
5: – Real (Kind=nag_wp)Input
On entry: , the value of the constant.
6: – Real (Kind=nag_wp)Output
On exit: the lower tail probability for the linear combination of central variables.
7: – Real (Kind=nag_wp) arrayWorkspace
8: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, .
On entry, .
Constraint: , or .
On entry, .
for all values of , for .
On entry, but two successive values of were not percent distinct.
An unexpected error has been triggered by this routine. Please
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
On successful exit at least four decimal places of accuracy should be achieved.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
g01jdf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
Pan's procedure can only work if the are sufficiently distinct. g01jdf uses the check , where the are the ordered nonzero values of .
For the situation when all the are positive g01jcf may be used. If the probabilities required are for the Durbin–Watson test, then the bounds for the probabilities are given by g01epf.
For , the choice of method, values of and and the are input and the probabilities computed and printed.