NAG Library Routine Document
g13dxf
(uni_arma_roots)
1
Purpose
g13dxf calculates the zeros of a vector autoregressive (or moving average) operator.
This routine is likely to be used in conjunction with
g05pjf,
g13asf,
g13ddf or
g13dsf.
2
Specification
Fortran Interface
Integer, Intent (In) | :: |
k,
ip | Integer, Intent (Inout) | :: |
ifail | Integer, Intent (Out) | :: |
iwork(k*ip) | Real (Kind=nag_wp), Intent (In) | :: |
par(ip*k*k) | Real (Kind=nag_wp), Intent (Out) | :: |
rr(k*ip),
ri(k*ip),
rmod(k*ip),
work(k*k*ip*ip) |
|
C Header Interface
#include nagmk26.h
void |
g13dxf_ (
const Integer *k,
const Integer *ip,
const double par[],
double rr[],
double ri[],
double rmod[],
double work[],
Integer iwork[],
Integer *ifail) |
|
3
Description
Consider the vector autoregressive moving average (VARMA) model
where
denotes a vector of
time series and
is a vector of
residual series having zero mean and a constant variance-covariance matrix. The components of
are also assumed to be uncorrelated at non-simultaneous lags.
denotes a sequence of
by
matrices of autoregressive (AR) parameters and
denotes a sequence of
by
matrices of moving average (MA) parameters.
is a vector of length
containing the series means. Let
where
denotes the
by
identity matrix.
The model
(1) is said to be stationary if the eigenvalues of
lie inside the unit circle. Similarly let
Then the model is said to be invertible if the eigenvalues of
lie inside the unit circle.
g13dxf returns the eigenvalues of (or the eigenvalues of ) along with their moduli, in descending order of magnitude. Thus to check for stationarity or invertibility you should check whether the modulus of the largest eigenvalue is less than one.
4
References
Wei W W S (1990) Time Series Analysis: Univariate and Multivariate Methods Addison–Wesley
5
Arguments
- 1: – IntegerInput
-
On entry: , the dimension of the multivariate time series.
Constraint:
.
- 2: – IntegerInput
-
On entry: the number of AR (or MA) parameter matrices, (or ).
Constraint:
.
- 3: – Real (Kind=nag_wp) arrayInput
-
On entry: the AR (or MA) parameter matrices read in row by row in the order (or ). That is,
must be set equal to the th element of , for (or the
th element of , for ).
- 4: – Real (Kind=nag_wp) arrayOutput
-
On exit: the real parts of the eigenvalues.
- 5: – Real (Kind=nag_wp) arrayOutput
-
On exit: the imaginary parts of the eigenvalues.
- 6: – Real (Kind=nag_wp) arrayOutput
-
On exit: the moduli of the eigenvalues.
- 7: – Real (Kind=nag_wp) arrayWorkspace
- 8: – Integer arrayWorkspace
-
- 9: – IntegerInput/Output
-
On entry:
ifail must be set to
,
. If you are unfamiliar with this argument you should refer to
Section 3.4 in How to Use the NAG Library and its Documentation for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this argument, the recommended value is
.
When the value 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).
6
Error Indicators and Warnings
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
Errors or warnings detected by the routine:
-
-
An excessive number of iterations are needed to evaluate the eigenvalues of (or ). This is an unlikely exit. All output arguments are undefined.
An unexpected error has been triggered by this routine. Please
contact
NAG.
See
Section 3.9 in How to Use the NAG Library and its Documentation for further information.
Your licence key may have expired or may not have been installed correctly.
See
Section 3.8 in How to Use the NAG Library and its Documentation for further information.
Dynamic memory allocation failed.
See
Section 3.7 in How to Use the NAG Library and its Documentation for further information.
7
Accuracy
The accuracy of the results depends on the original matrix and the multiplicity of the roots.
8
Parallelism and Performance
g13dxf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
g13dxf 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.
The time taken is approximately proportional to (or ).
10
Example
This example finds the eigenvalues of where and and .
10.1
Program Text
Program Text (g13dxfe.f90)
10.2
Program Data
Program Data (g13dxfe.d)
10.3
Program Results
Program Results (g13dxfe.r)