g01jd calculates the lower tail probability for a linear combination of (central) variables.
Syntax
C# |
---|
public static void g01jd( string method, int n, double[] rlam, double d, double c, out double prob, out int ifail ) |
Visual Basic |
---|
Public Shared Sub g01jd ( _ method As String, _ n As Integer, _ rlam As Double(), _ d As Double, _ c As Double, _ <OutAttribute> ByRef prob As Double, _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void g01jd( String^ method, int n, array<double>^ rlam, double d, double c, [OutAttribute] double% prob, [OutAttribute] int% ifail ) |
F# |
---|
static member g01jd : method : string * n : int * rlam : float[] * d : float * c : float * prob : float byref * ifail : int byref -> unit |
Parameters
- method
- Type: System..::..StringOn 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.
Constraint: , or .
- n
- Type: System..::..Int32On entry: , the number of independent standard Normal variates, (central variates).Constraint: .
- rlam
- Type: array<System..::..Double>[]()[][]An array of size [n]On entry: the weights, , for , of the central variables.Constraint: for at least one . If , then the must be at least distinct; see [Further Comments], for .
- d
- Type: System..::..DoubleOn entry: , the multiplier of the central variables.Constraint: .
- c
- Type: System..::..DoubleOn entry: , the value of the constant.
- prob
- Type: System..::..Double%On exit: the lower tail probability for the linear combination of central variables.
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
Let be independent Normal variables with mean zero and unit variance, so that have independent -distributions with unit degrees of freedom. g01jd evaluates the probability that
If this is equivalent to the probability that
Alternatively let
then g01jd 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 d01bd
is used to compute the value of the integral otherwise
d01aj
is used.
Pan's procedure can only be used if the are sufficiently distinct; g01jd requires the to be at least distinct; see [Further Comments]. If the are at least distinct and , then Pan's procedure is recommended; otherwise Imhof's procedure is recommended.
References
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 Biometrika 48 419–426
Pan Jie–Jian (1964) Distributions of the noncircular serial correlation coefficients Shuxue Jinzhan 7 328–337
Error Indicators and Warnings
Errors or warnings detected by the method:
On entry, , or , or , or .
- On entry, for all values of , for .
- On entry, yet two successive values of the ordered , for , were not at least distinct.
Accuracy
On successful exit at least four decimal places of accuracy should be achieved.
Parallelism and Performance
None.
Further Comments
Pan's procedure can only work if the are sufficiently distinct. g01jd uses the check , where the are the ordered nonzero values of .
Example
For , the choice of method, values of and and the are input and the probabilities computed and printed.
Example program (C#): g01jde.cs