hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_tsa_uni_arma_roots (g13dx)

 Contents

    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example

Purpose

nag_tsa_uni_arma_roots (g13dx) calculates the zeros of a vector autoregressive (or moving average) operator. This function is likely to be used in conjunction with nag_rand_times_mv_varma (g05pj), nag_tsa_uni_arima_resid (g13as), nag_tsa_multi_varma_estimate (g13dd) or nag_tsa_multi_varma_diag (g13ds).

Syntax

[rr, ri, rmod, ifail] = g13dx(k, ip, par)
[rr, ri, rmod, ifail] = nag_tsa_uni_arma_roots(k, ip, par)

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.
nag_tsa_uni_arma_roots (g13dx) 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.

References

Wei W W S (1990) Time Series Analysis: Univariate and Multivariate Methods Addison–Wesley

Parameters

Compulsory Input Parameters

1:     k int64int32nag_int scalar
k, the dimension of the multivariate time series.
Constraint: k1.
2:     ip int64int32nag_int scalar
The number of AR (or MA) parameter matrices, p (or q).
Constraint: ip1.
3:     parip×k×k – double array
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).

Optional Input Parameters

None.

Output Parameters

1:     rrk×ip – double array
The real parts of the eigenvalues.
2:     rik×ip – double array
The imaginary parts of the eigenvalues.
3:     rmodk×ip – double array
The moduli of the eigenvalues.
4:     ifail int64int32nag_int scalar
ifail=0 unless the function detects an error (see Error Indicators and Warnings).

Error Indicators and Warnings

Errors or warnings detected by the function:
   ifail=1
On entry,k<1,
orip<1.
   ifail=2
An excessive number of iterations are needed to evaluate the eigenvalues of Aϕ (or Bθ). This is an unlikely exit. All output arguments are undefined.
   ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
   ifail=-399
Your licence key may have expired or may not have been installed correctly.
   ifail=-999
Dynamic memory allocation failed.

Accuracy

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

Further Comments

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

Example

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


fprintf('g13dx example results\n\n');

k   = int64(2);
ip  = int64(1);
par = [0.802;     0.065;     0;     0.575];

% Calculate zeros
[rr, ri, rmod, ifail] = g13dx( ...
                               k, ip, par);

% Display results
fprintf('%20s%13s\n', 'Eigenvalues', 'Moduli');
fprintf('%20s%13s\n', '-----------', '------');
for i = 1:k*ip
  if ri(i)>=0
    fprintf(' %10.3f  + %6.3f i  %8.3f\n', rr(i), ri(i), rmod(i));
  else
    fprintf(' %10.3f  - %6.3f i  %8.3f\n', rr(i), -ri(i), rmod(i));
  end
end


g13dx example results

         Eigenvalues       Moduli
         -----------       ------
      0.802  +  0.000 i     0.802
      0.575  +  0.000 i     0.575

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015