NAG CL Interface
g13dxc (uni_​arma_​roots)

Settings help

CL Name Style:

1 Purpose

g13dxc calculates the zeros of a vector autoregressive (or moving average) operator.

2 Specification

#include <nag.h>
void  g13dxc (Integer k, Integer ip, const double par[], double rr[], double ri[], double rmod[], NagError *fail)
The function may be called by the names: g13dxc, nag_tsa_uni_arma_roots or nag_tsa_arma_roots.

3 Description

Consider the vector autoregressive moving average (VARMA) model
Wt-μ=ϕ1(Wt-1-μ)+ϕ2(Wt-2-μ)++ϕp(Wt-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×k matrices of autoregressive (AR) parameters and θ1,θ2,,θq denotes a sequence of k×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×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.
g13dxc 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 1.

4 References

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

5 Arguments

1: k Integer Input
On entry: k, the dimension of the multivariate time series.
Constraint: k1.
2: ip Integer Input
On entry: the number of AR (or MA) parameter matrices, p (or q).
Constraint: ip1.
3: par[ip×k×k] const double Input
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, par[(l-1)×k×k+(i-1)×k+j-1] must be set equal to the (i,j)th element of ϕl, for l=1,2,,p (or the (i,j)th element of θl, for l=1,2,,q).
4: rr[k×ip] double Output
On exit: the real parts of the eigenvalues.
5: ri[k×ip] double Output
On exit: the imaginary parts of the eigenvalues.
6: rmod[k×ip] double Output
On exit: the moduli of the eigenvalues.
7: fail NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

6 Error Indicators and Warnings

Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
On entry, argument value had an illegal value.
An excessive number of iterations have been required to calculate the eigenvalues.
On entry, ip=value.
Constraint: ip1.
On entry, k=value.
Constraint: k1.
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface 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

Background information to multithreading can be found in the Multithreading documentation.
g13dxc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
g13dxc 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 function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9 Further Comments

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

10 Example

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

10.1 Program Text

Program Text (g13dxce.c)

10.2 Program Data

Program Data (g13dxce.d)

10.3 Program Results

Program Results (g13dxce.r)