G01NAF computes the cumulants and moments of quadratic forms in Normal variates.
SUBROUTINE G01NAF ( |
MOM, MEAN, N, A, LDA, EMU, SIGMA, LDSIG, L, RKUM, RMOM, WK, IFAIL) |
INTEGER |
N, LDA, LDSIG, L, IFAIL |
REAL (KIND=nag_wp) |
A(LDA,N), EMU(*), SIGMA(LDSIG,N), RKUM(L), RMOM(*), WK(3*N*(N+1)/2+N) |
CHARACTER(1) |
MOM, MEAN |
|
Let
have an
-dimensional multivariate Normal distribution with mean
and variance-covariance matrix
. Then for a symmetric matrix
, G01NAF computes up to the first
moments and cumulants of the quadratic form
. The
th moment (about the origin) is defined as
where
denotes expectation. The
th moment of
can also be found as the coefficient of
in the expansion of
. The
th cumulant is defined as the coefficient of
in the expansion of
.
The routine is based on the routine CUM written by
Magnus and Pesaran (1993a) and based on the theory given by
Magnus (1978),
Magnus (1979) and
Magnus (1986).
Magnus J R (1978) The moments of products of quadratic forms in Normal variables Statist. Neerlandica 32 201–210
Magnus J R (1979) The expectation of products of quadratic forms in Normal variables: the practice Statist. Neerlandica 33 131–136
Magnus J R (1986) The exact moments of a ratio of quadratic forms in Normal variables Ann. Économ. Statist. 4 95–109
Magnus J R and Pesaran B (1993a) The evaluation of cumulants and moments of quadratic forms in Normal variables (CUM): Technical description Comput. Statist. 8 39–45
Magnus J R and Pesaran B (1993b) The evaluation of moments of quadratic forms and ratios of quadratic forms in Normal variables: Background, motivation and examples Comput. Statist. 8 47–55
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
In a range of tests the accuracy was found to be a modest multiple of
machine precision. See
Magnus and Pesaran (1993b).
None.
This example is given by
Magnus and Pesaran (1993b) and considers the simple autoregression
where
is a sequence of independent Normal variables with mean zero and variance one, and
is known. The moments of the quadratic form
are computed using G01NAF. The matrix
is given by:
The value of
can be computed using the relationships
and
for
and
.