g01jd Method
関数リスト一覧   NagLibrary Namespaceへ  ライブラリイントロダクション  本ヘルプドキュメントのchm形式版

g01jd calculates the lower tail probability for a linear combination of (central) χ2 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 (Declaration)
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..::.String
On entry: indicates whether Pan's, Imhof's or an appropriately selected procedure is to be used.
method="P"
Pan's method is used.
method="I"
Imhof's method is used.
method="D"
Pan's method is used if λi*, for i=1,2,,n are at least 1% distinct and n60; otherwise Imhof's method is used.
Constraint: method="P", "I" or "D".
n
Type: System..::.Int32
On entry: n, the number of independent standard Normal variates, (central χ2 variates).
Constraint: n1.
rlam
Type: array< System..::.Double >[]()[]
An array of size [n]
On entry: the weights, λi, for i=1,2,,n, of the central χ2 variables.
Constraint: rlam[i-1]d for at least one i. If method="P", then the λi*, for i=1,2,,n, must be at least 1% distinct; see [Further Comments].
d
Type: System..::.Double
On entry: d, the multiplier of the central χ2 variables.
Constraint: d0.0.
c
Type: System..::.Double
On entry: c, the value of the constant.
prob
Type: System..::.Double %
On exit: the lower tail probability for the linear combination of central χ2 variables.
ifail
Type: System..::.Int32 %
On exit: ifail=0 unless the method detects an error (see [Error Indicators and Warnings]).

Description

Let u1,u2,,un be independent Normal variables with mean zero and unit variance, so that u12,u22,,un2 have independent χ2-distributions with unit degrees of freedom. g01jd evaluates the probability that
λ1u12+λ2u22++λnun2<du12+u22++un2+c.
If c=0.0 this is equivalent to the probability that
λ1u12+λ2u22++λnun2 u12+u22++un2 <d.
Alternatively let
λi*=λi-d,   for ​ i= 1,2,,n,
then g01jd returns the probability that
λ1*u12+λ2*u22++λn*un2<c.
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 n6 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 λi* are sufficiently distinct; g01jd requires the λi* to be at least 1% distinct; see [Further Comments]. If the λi* are at least 1% distinct and n60, then Pan's procedure is recommended; otherwise Imhof's procedure is recommended.

References

Error Indicators and Warnings

Accuracy

Further Comments

Pan's procedure can only work if the λi* are sufficiently distinct. g01jd uses the check wj-wj-10.01×maxwj,wj-1, where the wj are the ordered nonzero values of λi*.
For the situation when all the λi are positive g01jc may be used. If the probabilities required are for the Durbin–Watson test, then the bounds for the probabilities are given by g01ep.

Example

See Also