The VARMAX Procedure

VARMA and VARMAX Modeling

Subsections:

A zero-mean VARMA() process is written as

or

where and .

Stationarity and Invertibility

For stationarity and invertibility of the VARMA process, the roots of and are outside the unit circle.

Parameter Estimation

Under the assumption of normality of the with zero mean vector and nonsingular covariance matrix , the conditional (approximate) log-likelihood function of a zero-mean VARMA(p,q) model is considered.

Define and with and ; define and . Then

where and .

Then, the conditional (approximate) log-likelihood function can be written as follows (Reinsel, 1997):

where , and is such that .

For the exact log-likelihood function of a VARMA(p,q) model, the Kalman filtering method is used for transforming the VARMA process into the state-space form (Reinsel, 1997).

The state-space form of the zero-mean VARMA(p,q) model consists of a state equation

and an observation equation

where for

and

The Kalman filtering approach is used for evaluation of the likelihood function. The updating equation is

where

The prediction equation is

where for .

The log-likelihood function can be expressed as

where and are determined recursively from the Kalman filter procedure. To construct the likelihood function from Kalman filtering, you obtain , , and .

Define the vector as

where and . All elements of are estimated through the preceding maximum likelihood method. The estimates of and are output in the ParameterEstimates ODS table. The estimates of the covariance matrix () are output in the CovarianceParameterEstimates ODS table. If you specify the OUTEST=, OUTCOV, PRINT=(COVB), or PRINT=(CORRB) option, you can see all elements of , including the covariance matrix , in the parameter estimates, covariance of parameter estimates, or correlation of parameter estimates. You can also apply the BOUND, INITIAL, RESTRICT, and TEST statements to any elements of , including the covariance matrix . For more information, see the syntax of the corresponding statement.

The log-likelihood equations are solved by iterative numerical procedures such as quasi-Newton optimization. The starting values for the AR and MA parameters are obtained from the least squares estimates.

Asymptotic Distribution of the Parameter Estimates

Under the assumptions of stationarity and invertibility for the VARMA model and the assumption that is a white noise process, is a consistent estimator for and converges in distribution to the multivariate normal as , where V is the asymptotic information matrix of .

Asymptotic Distributions of Impulse Response Functions

Defining the vector

the asymptotic distribution of the impulse response function for a VARMA() model is

where is the covariance matrix of the parameter estimates and

where is a matrix with the second following after p block matrices; is a matrix; is a matrix,

where

is a zero matrix, and

An Example of a VARMA(1,1) Model

Consider a VARMA(1,1) model with mean zero,

where is the white noise process with a mean zero vector and the positive-definite covariance matrix .

The following IML procedure statements simulate a bivariate vector time series from this model to provide test data for the VARMAX procedure:

proc iml;
sig = {1.0  0.5, 0.5 1.25};
phi = {1.2 -0.5, 0.6 0.3};
theta = {0.5 -0.2, 0.1 0.3};
/* to simulate the vector time series */
call varmasim(y,phi,theta) sigma=sig n=100 seed=34657;
cn = {'y1' 'y2'};
create simul3 from y[colname=cn];
append from y;
run;


The following statements fit a VARMA(1,1) model to the simulated data. You specify the order of the autoregressive model by using the P= option and specify the order of moving-average model by using the Q= option. You specify the quasi-Newton optimization in the NLOPTIONS statement as an optimization method.

proc varmax data=simul3;
nloptions tech=qn;
model y1 y2 / p=1 q=1 noint print=(estimates);
run;


Figure 35.46 shows the initial values of parameters. The initial values were estimated by using the least squares method.

Figure 35.46: Start Parameter Estimates for the VARMA(1, 1) Model

The VARMAX Procedure

Optimization Start
Parameter Estimates
Objective
Function
1 AR1_1_1 0.959310 -3.488219
2 AR1_2_1 0.477042 -3.205140
3 AR1_1_2 -0.361453 2.205310
4 AR1_2_2 0.459925 -10.424390
5 MA1_1_1 0.241867 -1.954887
6 MA1_2_1 -0.036150 2.374747
7 MA1_1_2 -0.006796 -1.380100
8 MA1_2_2 0.443780 0.163188
9 COV1_1 1.341581 2.434759
10 COV1_2 0.413842 -1.156685
11 COV2_2 1.433082 2.594585

Figure 35.47 shows the default option settings for the quasi-Newton optimization technique.

Figure 35.47: Default Criteria for the quasi-Newton Optimization

Minimum Iterations 0 200 2000 0.00001 1E-8 0 2.220446E-16 0 0 0 0 0 -1.34078E154 2 1 0.4 . 1E-8

Figure 35.48 shows the iteration history of parameter estimates.

Figure 35.48: Iteration History of Parameter Estimates

Iteration   Restarts Function
Calls
Active
Constraints
Objective
Function
Objective
Function
Change
Max Abs
Element
Step
Size
Slope of
Search
Direction
1   0 3 0   121.98400 0.1545 5.4061 0.00397 -77.396
2   0 5 0   121.77907 0.2049 5.4343 2.417 -0.171
3   0 7 0   121.40363 0.3754 5.4634 2.000 -0.442
4   0 8 0   121.25691 0.1467 3.1529 1.000 -0.320
5   0 9 0   121.15193 0.1050 4.7781 1.000 -0.164
6   0 10 0   121.11790 0.0340 7.1243 1.104 -0.238
7   0 11 0   121.06055 0.0573 2.0281 0.635 -0.134
8   0 13 0   121.04817 0.0124 0.4585 0.971 -0.0244
9   0 15 0   121.04317 0.00500 0.9910 2.740 -0.0035
10   0 16 0   121.03806 0.00510 0.4747 2.088 -0.0060
11   0 18 0   121.03614 0.00193 0.2124 1.664 -0.0023
12   0 20 0   121.03552 0.000620 0.2132 1.711 -0.0007
13   0 22 0   121.03534 0.000177 0.0710 1.553 -0.0002
14   0 24 0   121.03526 0.000082 0.0741 2.588 -0.0001
15   0 25 0   121.03519 0.000066 0.0229 4.226 -487E-7
16   0 27 0   121.03518 0.000012 0.00861 1.049 -229E-7
17   0 29 0   121.03518 1.148E-6 0.00525 3.613 -636E-9

Figure 35.49 shows the final parameter estimates.

Figure 35.49: Results of Parameter Estimates for the VARMA(1, 1) Model

The VARMAX Procedure

Optimization Results
Parameter Estimates
Objective
Function
1 AR1_1_1 1.018488 0.002445
2 AR1_2_1 0.391823 0.002843
3 AR1_1_2 -0.386834 -0.004319
4 AR1_2_2 0.552784 -0.004034
5 MA1_1_1 0.322912 -0.000812
6 MA1_2_1 -0.165038 -0.002432
7 MA1_1_2 -0.021574 0.004775
8 MA1_2_2 0.585777 0.000051749
9 COV1_1 1.251857 -0.005248
10 COV1_2 0.379514 0.000972
11 COV2_2 1.313176 0.001540

Figure 35.50 shows the AR coefficient matrix in terms of lag 1, the MA coefficient matrix in terms of lag 1, the parameter estimates, and their significance, which is one indication of how well the model fits the data.

Figure 35.50: Parameter Estimates for the VARMA(1, 1) Model

The VARMAX Procedure

Type of Model VARMA(1,1) Maximum Likelihood Estimation

AR
Lag Variable y1 y2
1 y1 1.01849 -0.38683
y2 0.39182 0.55278

MA
Lag Variable e1 e2
1 y1 0.32291 -0.02157
y2 -0.16504 0.58578

Schematic Representation
Variable/Lag AR1 MA1
y1 +- +.
y2 ++ .+

Model Parameter Estimates
Equation Parameter Estimate Standard
Error
t Value Pr > |t| Variable
y1 AR1_1_1 1.01849 0.10255 9.93 0.0001 y1(t-1)
AR1_1_2 -0.38683 0.09644 -4.01 0.0001 y2(t-1)
MA1_1_1 0.32291 0.14523 2.22 0.0285 e1(t-1)
MA1_1_2 -0.02157 0.14203 -0.15 0.8796 e2(t-1)
y2 AR1_2_1 0.39182 0.10062 3.89 0.0002 y1(t-1)
AR1_2_2 0.55278 0.08423 6.56 0.0001 y2(t-1)
MA1_2_1 -0.16504 0.15704 -1.05 0.2959 e1(t-1)
MA1_2_2 0.58578 0.14116 4.15 0.0001 e2(t-1)

Covariance Parameter Estimates
Parameter Estimate Standard
Error
t Value Pr > |t|
COV1_1 1.25186 0.17692 7.08 0.0001
COV1_2 0.37951 0.13400 2.83 0.0056
COV2_2 1.31318 0.18610 7.06 0.0001

The fitted VARMA(1,1) model with estimated standard errors in parentheses is given as

and

VARMAX Modeling

A general VARMAX() process is written as

or

where , . The consists of all possible deterministic terms, namely constant, seasonal dummies, linear trend, quadratic trend, and exogenous variables; , where ; ; , are seasonal dummies and is based on NSEASON= option; ; is the parameter matrix corresponding to and for .

The state-space form of the VARMAX(p,q,s) model consists of a state equation

and an observation equation

where for

and

The Kalman filtering approach is used to evaluate the likelihood function. The updating equation is

where

The prediction equation is

where for .

The log-likelihood function can be expressed as

where and are determined recursively from the Kalman filter procedure. To construct the likelihood function from Kalman filtering, you obtain , , and . Note that the dimension of the state-space vector of the Kalman filtering method for the VARMAX(p,q,s) model is large, so it takes a lot of time and memory for computing.

Two examples of VARMAX modeling follow:

model y1 y2 = x1 / q=1;
nloptions tech=qn;

model y1 y2 = x1 / p=1 q=1 xlag=1 nocurrentx;
nloptions tech=qn;