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)

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μ = φ1(Wt1μ) + φ2(Wt2μ) + + φp(Wtpμ) + εtθ1εt1θ2εt2θqεtq,
Wt-μ=ϕ1(Wt-1-μ)+ϕ2(Wt-2-μ)++ϕp(Wt-p-μ)+εt-θ1εt-1-θ2εt-2--θqεt-q,
(1)
where WtWt denotes a vector of kk time series and εtεt is a vector of kk residual series having zero mean and a constant variance-covariance matrix. The components of εtεt are also assumed to be uncorrelated at non-simultaneous lags. φ1,φ2,,φpϕ1,ϕ2,,ϕp denotes a sequence of kk by kk matrices of autoregressive (AR) parameters and θ1,θ2,,θqθ1,θ2,,θq denotes a sequence of kk by kk matrices of moving average (MA) parameters. μμ is a vector of length kk 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
A(ϕ)= [ ϕ1 I 0 . . . 0 ϕ2 0 I 0 . . 0 . . . . . . ϕp-1 0 . . . 0 I ϕp 0 . . . 0 0 ] pk×pk
where II denotes the kk by kk identity matrix.
The model (1) is said to be stationary if the eigenvalues of A(φ)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.
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(θ)B(θ) lie inside the unit circle.
nag_tsa_uni_arma_roots (g13dx) returns the pkpk eigenvalues of A(φ)A(ϕ) (or the qkqk eigenvalues of B(θ)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
kk, the dimension of the multivariate time series.
Constraint: k1k1.
2:     ip – int64int32nag_int scalar
The number of AR (or MA) parameter matrices, pp (or qq).
Constraint: ip1ip1.
3:     par(ip × k × kip×k×k) – double array
The AR (or MA) parameter matrices read in row by row in the order φ1,φ2,,φpϕ1,ϕ2,,ϕp (or θ1,θ2,,θqθ1,θ2,,θq). That is, par((l1) × k × k + (i1) × k + j)par(l-1)×k×k+(i-1)×k+j must be set equal to the (i,j)(i,j)th element of φlϕl, for l = 1,2,,pl=1,2,,p (or the (i,j)(i,j)th element of θlθl, for l = 1,2,,ql=1,2,,q).

Optional Input Parameters

None.

Input Parameters Omitted from the MATLAB Interface

work iwork

Output Parameters

1:     rr(k × ipk×ip) – double array
The real parts of the eigenvalues.
2:     ri(k × ipk×ip) – double array
The imaginary parts of the eigenvalues.
3:     rmod(k × ipk×ip) – double array
The moduli of the eigenvalues.
4:     ifail – int64int32nag_int scalar
ifail = 0ifail=0 unless the function detects an error (see [Error Indicators and Warnings]).

Error Indicators and Warnings

Errors or warnings detected by the function:
  ifail = 1ifail=1
On entry,k < 1k<1,
orip < 1ip<1.
  ifail = 2ifail=2
An excessive number of iterations are needed to evaluate the eigenvalues of A(φ)A(ϕ) (or B(θ)B(θ)). This is an unlikely exit. All output parameters are undefined.

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 kp3kp3 (or kq3kq3).

Example

function nag_tsa_uni_arma_roots_example
k = int64(2);
ip = int64(1);
par = [0.802;
     0.065;
     0;
     0.575];
[rr, ri, rmod, ifail] = nag_tsa_uni_arma_roots(k, ip, par)
 

rr =

    0.8020
    0.5750


ri =

     0
     0


rmod =

    0.8020
    0.5750


ifail =

                    0


function g13dx_example
k = int64(2);
ip = int64(1);
par = [0.802;
     0.065;
     0;
     0.575];
[rr, ri, rmod, ifail] = g13dx(k, ip, par)
 

rr =

    0.8020
    0.5750


ri =

     0
     0


rmod =

    0.8020
    0.5750


ifail =

                    0



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–2013