g13dx calculates the zeros of a vector autoregressive (or moving average) operator. This method is likely to be used in conjunction with g05pj g13as g13dd (G13DSF not in this release).


public static void g13dx(
	int k,
	int ip,
	double[] par,
	double[] rr,
	double[] ri,
	double[] rmod,
	out int ifail
Visual Basic
Public Shared Sub g13dx ( _
	k As Integer, _
	ip As Integer, _
	par As Double(), _
	rr As Double(), _
	ri As Double(), _
	rmod As Double(), _
	<OutAttribute> ByRef ifail As Integer _
Visual C++
static void g13dx(
	int k, 
	int ip, 
	array<double>^ par, 
	array<double>^ rr, 
	array<double>^ ri, 
	array<double>^ rmod, 
	[OutAttribute] int% ifail
static member g13dx : 
        k : int * 
        ip : int * 
        par : float[] * 
        rr : float[] * 
        ri : float[] * 
        rmod : float[] * 
        ifail : int byref -> unit 


Type: System..::..Int32
On entry: k, the dimension of the multivariate time series.
Constraint: k1.
Type: System..::..Int32
On entry: the number of AR (or MA) parameter matrices, p (or q).
Constraint: ip1.
Type: array<System..::..Double>[]()[][]
An array of size [ip×k×k]
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,jth element of ϕl, for l=1,2,,p (or the i,jth element of θl, for l=1,2,,q).
Type: array<System..::..Double>[]()[][]
An array of size [k×ip]
On exit: the real parts of the eigenvalues.
Type: array<System..::..Double>[]()[][]
An array of size [k×ip]
On exit: the imaginary parts of the eigenvalues.
Type: array<System..::..Double>[]()[][]
An array of size [k×ip]
On exit: the moduli of the eigenvalues.
Type: System..::..Int32%
On exit: ifail=0 unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).


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
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
Then the model is said to be invertible if the eigenvalues of Bθ lie inside the unit circle.
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.


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

Error Indicators and Warnings

Errors or warnings detected by the method:
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.
An error occured, see message report.
Negative dimension for array value
Invalid Parameters value


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

Parallelism and Performance


Further Comments

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


This example finds the eigenvalues of Aϕ where k=2 and p=1 and ϕ1=0.8020.0650.0000.575.

Example program (C#): g13dxe.cs

Example program data: g13dxe.d

Example program results: g13dxe.r

See Also