|
NAG[g01jdc] NAG[nag_prob_lin_chi_sq] - Computes lower tail probability for a linear combination of (central) variables
|
|
Calling Sequence
g01jdc(method, rlam, d, c, prob, 'n'=n, 'fail'=fail)
nag_prob_lin_chi_sq(. . .)
Parameters
|
method - String;
|
|
|
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.
|
|
Constraint: "Nag_LCCPan", "Nag_LCCImhof" or "Nag_LCCDefault". .
|
|
|
rlam - Vector(1..n, datatype=float[8]);
|
|
|
|
d - float;
|
|
|
On entry: , the multiplier of the central variables.
|
|
Constraint: . .
|
|
|
c - float;
|
|
|
On entry: , the value of the constant.
|
|
|
prob - assignable;
|
|
|
Note: On exit the variable prob will have a value of type float.
|
|
On exit: the lower tail probability for the linear combination of central variables.
|
|
|
'n'=n - integer; (optional)
|
|
|
On entry: , the number of independent standard Normal variates, (central variates).
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_prob_lin_chi_sq (g01jdc) calculates the lower tail probability for a linear combination of (central) variables.
|
|
Description
|
|
Let be independent Normal variables with mean zero and unit variance, so that have independent -distributions with unit degrees of freedom. nag_prob_lin_chi_sq (g01jdc) evaluates the probability that
If this is equivalent to the probability that
Alternatively let
then nag_prob_lin_chi_sq (g01jdc) 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 is used to compute the value of the integral otherwise d01ajc (nag_1d_quad_gen) is used.
Pan's procedure can only be used if the are sufficiently distinct; nag_prob_lin_chi_sq (g01jdc) requires the to be at least distinct; see Section [Further Comments]. If the are at least distinct and , then Pan's procedure is recommended; otherwise Imhof's procedure is recommended.
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_INT"
On entry, . Constraint: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
"NE_REAL"
On entry, . Constraint: .
"NE_REAL_ARRAY"
On entry, all values of .
"NE_REAL_ARRAY_ENUM"
On entry, but two successive values of were not 1 percent distinct.
|
|
Accuracy
|
|
On successful exit at least four decimal places of accuracy should be achieved.
|
|
|
Examples
|
|
>
|
method := "Nag_LCCPan":
n := 10:
d := 1:
c := 0:
rlam := Vector([-9, -7, -5, -3, -1, 2, 4, 6, 8, 10], datatype=float[8]):
NAG:-g01jdc(method, rlam, d, c, prob, 'n' = n):
|
|
|
See Also
|
|
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
g01 Chapter Introduction.
NAG Toolbox Overview.
NAG Web Site.
|
|