The routine may be called by the names g01naf or nagf_stat_moments_quad_form.
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 .
Note: the dimension of the array rmom
must be at least
if , and at least otherwise.
On exit: if , the l moments of the quadratic form.
12: – Real (Kind=nag_wp) arrayWorkspace
13: – 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).
g01naf makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
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.