G13DXF (PDF version)
G13 Chapter Contents
G13 Chapter Introduction
NAG Library Manual

NAG Library Routine Document


Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

+ Contents

    1  Purpose
    7  Accuracy

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


3  Description

Consider the vector autoregressive moving average (VARMA) model
Wt-μ=ϕ1Wt-1-μ+ϕ2Wt-2-μ++ϕpWt-p-μ+εt-θ1εt-1-θ2εt-2--θqεt-q, (1)
where Wt denotes a vector of k time series and εt is a vector of k residual series having zero mean and a constant variance-covariance matrix. The components of εt are also assumed to be uncorrelated at non-simultaneous lags. ϕ1,ϕ2,,ϕp denotes a sequence of k by k matrices of autoregressive (AR) parameters and θ1,θ2,,θq denotes a sequence of k by k matrices of moving average (MA) parameters. μ is a vector of length k containing the series means. Let
Aϕ= ϕ1 I 0 . . . 0 ϕ2 0 I 0 . . 0 . . . . . . ϕp-1 0 . . . 0 I ϕp 0 . . . 0 0 pk×pk
where I denotes the k by k identity matrix.
The model (1) is said to be stationary if the eigenvalues of Aϕ lie inside the unit circle. Similarly let
Bθ= θ1 I 0 . . . 0 θ2 0 I 0 . . 0 . . . . . . θq-1 0 . . . 0 I θq 0 . . . 0 0 qk×qk .
Then the model is said to be invertible if the eigenvalues of Bθ lie inside the unit circle.
G13DXF returns the pk eigenvalues of Aϕ (or the qk eigenvalues of Bθ) 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  Parameters

1:     K – INTEGERInput
On entry: k, the dimension of the multivariate time series.
Constraint: K1.
2:     IP – INTEGERInput
On entry: the number of AR (or MA) parameter matrices, p (or q).
Constraint: IP1.
3:     PAR(IP×K×K) – REAL (KIND=nag_wp) arrayInput
On entry: the AR (or MA) parameter matrices read in row by row in the order ϕ1,ϕ2,,ϕp (or θ1,θ2,,θq). That is, PARl-1×k×k+i-1×k+j must be set equal to the i,jth element of ϕl, for l=1,2,,p (or the i,jth element of θl, for l=1,2,,q).
4:     RR(K×IP) – REAL (KIND=nag_wp) arrayOutput
On exit: the real parts of the eigenvalues.
5:     RI(K×IP) – REAL (KIND=nag_wp) arrayOutput
On exit: the imaginary parts of the eigenvalues.
6:     RMOD(K×IP) – REAL (KIND=nag_wp) arrayOutput
On exit: the moduli of the eigenvalues.
7:     WORK(K×K×IP×IP) – REAL (KIND=nag_wp) arrayWorkspace
8:     IWORK(K×IP) – INTEGER arrayWorkspace
9:     IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to 0, -1​ or ​1. If you are unfamiliar with this parameter you should refer to Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value -1​ or ​1 is recommended. If the output of error messages is undesirable, then the value 1 is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is 0. When the value -1​ or ​1 is used it is essential to test the value of IFAIL on exit.
On exit: IFAIL=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6  Error Indicators and Warnings

If on entry IFAIL=0 or -1, explanatory error messages are output on the current error message unit (as defined by X04AAF).
Errors or warnings detected by the routine:
On entry,K<1,
An excessive number of iterations are needed to evaluate the eigenvalues of Aϕ (or Bθ). This is an unlikely exit. All output parameters are undefined.

7  Accuracy

The accuracy of the results depends on the original matrix and the multiplicity of the roots.

8  Further Comments

The time taken is approximately proportional to kp3 (or kq3).

9  Example

This example finds the eigenvalues of Aϕ where k=2 and p=1 and ϕ1= 0.802 0.065 0.000 0.575 .

9.1  Program Text

Program Text (g13dxfe.f90)

9.2  Program Data

Program Data (g13dxfe.d)

9.3  Program Results

Program Results (g13dxfe.r)

G13DXF (PDF version)
G13 Chapter Contents
G13 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012