VARMAX Procedure

VARMA and VARMAX Modeling

A zero-mean VARMA(p comma q) process is written as

StartLayout 1st Row  bold y Subscript t Baseline equals sigma-summation Underscript i equals 1 Overscript p Endscripts normal upper Phi Subscript i Baseline bold y Subscript t minus i Baseline plus bold-italic epsilon Subscript t Baseline minus sigma-summation Underscript i equals 1 Overscript q Endscripts normal upper Theta Subscript i Baseline bold-italic epsilon Subscript t minus i EndLayout

or

StartLayout 1st Row  normal upper Phi left-parenthesis upper B right-parenthesis bold y Subscript t Baseline equals normal upper Theta left-parenthesis upper B right-parenthesis bold-italic epsilon Subscript t EndLayout

where normal upper Phi left-parenthesis upper B right-parenthesis equals upper I Subscript k Baseline minus sigma-summation Underscript i equals 1 Overscript p Endscripts normal upper Phi Subscript i Baseline upper B Superscript i and normal upper Theta left-parenthesis upper B right-parenthesis equals upper I Subscript k Baseline minus sigma-summation Underscript i equals 1 Overscript q Endscripts normal upper Theta Subscript i Baseline upper B Superscript i.

Stationarity and Invertibility

For stationarity and invertibility of the VARMA process, the roots of StartAbsoluteValue normal upper Phi left-parenthesis z right-parenthesis EndAbsoluteValue equals 0 and StartAbsoluteValue normal upper Theta left-parenthesis z right-parenthesis EndAbsoluteValue equals 0 are outside the unit circle.

Parameter Estimation

Under the assumption of normality of the bold-italic epsilon Subscript t with zero-mean vector and nonsingular covariance matrix normal upper Sigma, the conditional (approximate) log-likelihood function of a zero-mean VARMA(p,q) model is considered.

Define upper Y equals left-parenthesis bold y 1 comma ellipsis comma bold y Subscript upper T Baseline right-parenthesis prime and upper E equals left-parenthesis bold-italic epsilon 1 comma ellipsis comma bold-italic epsilon Subscript upper T Baseline right-parenthesis prime with upper B Superscript i Baseline upper Y equals left-parenthesis bold y Subscript 1 minus i Baseline comma ellipsis comma bold y Subscript upper T minus i Baseline right-parenthesis prime and upper B Superscript i Baseline upper E equals left-parenthesis bold-italic epsilon Subscript 1 minus i Baseline comma ellipsis comma bold-italic epsilon Subscript upper T minus i Baseline right-parenthesis prime; define bold y equals normal v normal e normal c left-parenthesis upper Y prime right-parenthesis and bold e equals normal v normal e normal c left-parenthesis upper E prime right-parenthesis. Then

bold y minus sigma-summation Underscript i equals 1 Overscript p Endscripts left-parenthesis upper I Subscript upper T Baseline circled-times normal upper Phi Subscript i Baseline right-parenthesis upper B Superscript i Baseline bold y equals bold e minus sigma-summation Underscript i equals 1 Overscript q Endscripts left-parenthesis upper I Subscript upper T Baseline circled-times normal upper Theta Subscript i Baseline right-parenthesis upper B Superscript i Baseline bold e

where upper B Superscript i Baseline bold y equals normal v normal e normal c left-bracket left-parenthesis upper B Superscript i Baseline upper Y right-parenthesis prime right-bracket and upper B Superscript i Baseline bold e equals normal v normal e normal c left-bracket left-parenthesis upper B Superscript i Baseline upper E right-parenthesis prime right-bracket.

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

StartLayout 1st Row 1st Column script l 2nd Column equals 3rd Column minus StartFraction upper T Over 2 EndFraction log StartAbsoluteValue normal upper Sigma EndAbsoluteValue minus one-half sigma-summation Underscript t equals 1 Overscript upper T Endscripts bold-italic epsilon prime Subscript t Baseline normal upper Sigma Superscript negative 1 Baseline bold-italic epsilon Subscript t 2nd Row 1st Column Blank 2nd Column equals 3rd Column minus StartFraction upper T Over 2 EndFraction log StartAbsoluteValue normal upper Sigma EndAbsoluteValue minus one-half bold w prime normal upper Theta Superscript prime negative 1 Baseline left-parenthesis upper I Subscript upper T Baseline circled-times normal upper Sigma Superscript negative 1 Baseline right-parenthesis normal upper Theta Superscript negative 1 Baseline bold w EndLayout

where bold w equals bold y minus sigma-summation Underscript i equals 1 Overscript p Endscripts left-parenthesis upper I Subscript upper T Baseline circled-times normal upper Phi Subscript i Baseline right-parenthesis upper B Superscript i Baseline bold y and normal upper Theta is such that bold e minus sigma-summation Underscript i equals 1 Overscript q Endscripts left-parenthesis upper I Subscript upper T Baseline circled-times normal upper Theta Subscript i Baseline right-parenthesis upper B Superscript i Baseline bold e equals normal upper Theta bold e. You can specify METHOD=CML in the MODEL statement to apply conditional maximum likelihood estimation.

For the exact log-likelihood function of a VARMA model, the VARMA model is transformed into the equivalent state space form and then the Kalman filtering method is applied.

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

bold z Subscript t Baseline equals upper F bold z Subscript t minus 1 Baseline plus upper G bold-italic epsilon Subscript t

and an observation equation

bold y Subscript t Baseline equals upper H bold z Subscript t

where

bold z Subscript t Baseline equals left-parenthesis bold y prime Subscript t Baseline comma bold y prime Subscript t minus 1 Baseline comma ellipsis comma bold y prime Subscript t minus left-parenthesis v minus 1 right-parenthesis Baseline comma bold-italic epsilon prime Subscript t Baseline comma bold-italic epsilon Subscript t minus 1 Baseline comma ellipsis comma bold-italic epsilon prime Subscript t minus left-parenthesis q minus 1 right-parenthesis right-parenthesis prime
upper F equals Start 8 By 8 Matrix 1st Row 1st Column normal upper Phi 1 2nd Column midline-horizontal-ellipsis 3rd Column normal upper Phi Subscript v minus 1 Baseline 4th Column normal upper Phi Subscript v Baseline 5th Column minus normal upper Theta 1 6th Column midline-horizontal-ellipsis 7th Column minus normal upper Theta Subscript q minus 1 Baseline 8th Column minus normal upper Theta Subscript q Baseline 2nd Row 1st Column upper I Subscript k Baseline 2nd Column midline-horizontal-ellipsis 3rd Column 0 4th Column 0 5th Column 0 6th Column midline-horizontal-ellipsis 7th Column 0 8th Column 0 3rd Row 1st Column vertical-ellipsis 2nd Column down-right-diagonal-ellipsis 3rd Column 0 4th Column vertical-ellipsis 5th Column vertical-ellipsis 6th Column down-right-diagonal-ellipsis 7th Column vertical-ellipsis 8th Column vertical-ellipsis 4th Row 1st Column 0 2nd Column midline-horizontal-ellipsis 3rd Column upper I Subscript k Baseline 4th Column 0 5th Column 0 6th Column midline-horizontal-ellipsis 7th Column 0 8th Column 0 5th Row 1st Column 0 2nd Column midline-horizontal-ellipsis 3rd Column 0 4th Column 0 5th Column 0 6th Column midline-horizontal-ellipsis 7th Column 0 8th Column 0 6th Row 1st Column 0 2nd Column midline-horizontal-ellipsis 3rd Column 0 4th Column 0 5th Column upper I Subscript k Baseline 6th Column midline-horizontal-ellipsis 7th Column 0 8th Column 0 7th Row 1st Column vertical-ellipsis 2nd Column down-right-diagonal-ellipsis 3rd Column 0 4th Column vertical-ellipsis 5th Column vertical-ellipsis 6th Column down-right-diagonal-ellipsis 7th Column vertical-ellipsis 8th Column vertical-ellipsis 8th Row 1st Column 0 2nd Column midline-horizontal-ellipsis 3rd Column 0 4th Column 0 5th Column 0 6th Column midline-horizontal-ellipsis 7th Column upper I Subscript k Baseline 8th Column 0 EndMatrix comma upper G equals Start 4 By 1 Matrix 1st Row  upper I Subscript k Baseline 2nd Row  0 Subscript k left-parenthesis v minus 1 right-parenthesis times k Baseline 3rd Row  upper I Subscript k Baseline 4th Row  0 Subscript k left-parenthesis q minus 1 right-parenthesis times k Baseline EndMatrix

and

upper H equals left-bracket upper I Subscript k Baseline comma 0 Subscript k left-parenthesis v plus q minus 1 right-parenthesis times k Baseline right-bracket

where v equals normal m normal a normal x left-parenthesis p comma 1 right-parenthesis and normal upper Phi Subscript i Baseline equals 0 for i greater-than p.

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

ModifyingAbove bold z With caret Subscript t vertical-bar t Baseline equals ModifyingAbove bold z With caret Subscript t vertical-bar t minus 1 Baseline plus upper K Subscript t Baseline bold-italic epsilon Subscript t vertical-bar t minus 1

where

upper K Subscript t Baseline equals upper P Subscript t vertical-bar t minus 1 Baseline upper H prime left-bracket upper H upper P Subscript t vertical-bar t minus 1 Baseline upper H prime right-bracket Superscript negative 1

The prediction equation is

ModifyingAbove bold z With caret Subscript t vertical-bar t minus 1 Baseline equals upper F ModifyingAbove bold z With caret Subscript t minus 1 vertical-bar t minus 1 Baseline comma upper P Subscript t vertical-bar t minus 1 Baseline equals upper F upper P Subscript t minus 1 vertical-bar t minus 1 Baseline upper F Superscript prime Baseline plus upper G normal upper Sigma upper G prime

where upper P Subscript t vertical-bar t Baseline equals left-bracket upper I minus upper K Subscript t Baseline upper H right-bracket upper P Subscript t vertical-bar t minus 1 for t equals 1 comma 2 comma ellipsis comma n.

The log-likelihood function can be expressed as

script l equals minus one-half sigma-summation Underscript t equals 1 Overscript upper T Endscripts left-bracket log StartAbsoluteValue normal upper Sigma Subscript t vertical-bar t minus 1 Baseline EndAbsoluteValue plus left-parenthesis bold y Subscript t Baseline minus ModifyingAbove bold y With caret Subscript t vertical-bar t minus 1 Baseline right-parenthesis prime normal upper Sigma Subscript t vertical-bar t minus 1 Superscript negative 1 Baseline left-parenthesis bold y Subscript t Baseline minus ModifyingAbove bold y With caret Subscript t vertical-bar t minus 1 Baseline right-parenthesis right-bracket

where ModifyingAbove bold y With caret Subscript t vertical-bar t minus 1 and normal upper Sigma Subscript t vertical-bar t minus 1 are determined recursively from the Kalman filtering method. To construct the likelihood function from Kalman filtering, you obtain ModifyingAbove bold y With caret Subscript t vertical-bar t minus 1 Baseline equals upper H ModifyingAbove bold z With caret Subscript t vertical-bar t minus 1, ModifyingAbove bold-italic epsilon With caret Subscript t vertical-bar t minus 1 Baseline equals bold y Subscript t Baseline minus ModifyingAbove bold y With caret Subscript t vertical-bar t minus 1, and normal upper Sigma Subscript t vertical-bar t minus 1 Baseline equals upper H upper P Subscript t vertical-bar t minus 1 Baseline upper H prime.

When you specify METHOD=ML in the MODEL statement, the exact log likelihood is evaluated and used in the maximum likelihood estimation.

Define the vector bold-italic beta as

bold-italic beta equals left-parenthesis phi prime 1 comma ellipsis comma phi prime Subscript p Baseline comma theta prime 1 comma ellipsis comma theta prime Subscript q Baseline comma normal v normal e normal c normal h left-parenthesis normal upper Sigma right-parenthesis right-parenthesis prime

where phi Subscript i Baseline equals normal v normal e normal c left-parenthesis normal upper Phi Subscript i Baseline right-parenthesis and theta Subscript i Baseline equals normal v normal e normal c left-parenthesis normal upper Theta Subscript i Baseline right-parenthesis. All elements of bold-italic beta are estimated through the preceding (conditional) maximum likelihood method. The estimates of normal upper Phi Subscript i Baseline comma i equals 1 comma ellipsis comma p, and normal upper Theta Subscript i Baseline comma i equals 1 comma ellipsis comma q, are output in the ParameterEstimates ODS table. The estimates of the covariance matrix (normal upper Sigma) 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 bold-italic beta, including the covariance matrix normal upper Sigma, 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 bold-italic beta, including the covariance matrix normal upper Sigma. For more information, see the syntax of the corresponding statement.

The (conditional) log-likelihood equations are solved by iterative numerical methods such as quasi-Newton optimization. The starting values for the AR and MA parameters are obtained from the least squares estimates. Although the small-sample properties of CML estimates might not be as good as the ML estimates, the CML method is much faster than the ML method. Depending on the sample size and number of parameters to be estimated, the CML method can be hundreds or even thousands of times faster than the ML method. In the following example code, the CML method is about 100 times faster than the ML method, with very similar estimation and forecast results:

proc iml;
   phi = (0.9 * I(4)) // (-0.7* I(4));
   theta = 0.8 * I(4);
   sig = I(4);
   /* to simulate the vector time series */
   call varmasim(y,phi,theta) sigma=sig n=400 seed=2;

   cn = {'y1' 'y2' 'y3' 'y4'};
   create simul6 from y[colname=cn];
   append from y;
   close;
quit;

proc varmax data=simul6;
   model y1 y2 y3 y4 / noint p=2 q=1 method=cml;
   nloptions pall maxit=5000 tech=qn;
   output out=ocml back=12 lead=24;
run;

proc varmax data=simul6;
   model y1 y2 y3 y4 / noint p=2 q=1 method=ml;
   nloptions pall maxit=5000 tech=qn;
   output out=oml back=12 lead=24;
run;

Asymptotic Distribution of the Parameter Estimates

Under the assumptions of stationarity and invertibility for the VARMA model and the assumption that bold-italic epsilon Subscript t is a white noise process, ModifyingAbove bold-italic beta With caret is a consistent estimator for bold-italic beta and StartRoot upper T EndRoot left-parenthesis ModifyingAbove bold-italic beta With caret minus bold-italic beta right-parenthesis converges in distribution to the multivariate normal upper N left-parenthesis 0 comma upper V Superscript negative 1 Baseline right-parenthesis as upper T right-arrow normal infinity, where V is the asymptotic information matrix of bold-italic beta.

Asymptotic Distributions of Impulse Response Functions

Defining the vector bold-italic beta

bold-italic beta equals left-parenthesis phi prime 1 comma ellipsis comma phi prime Subscript p Baseline comma theta prime 1 comma ellipsis comma theta prime Subscript q right-parenthesis prime

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

StartRoot upper T EndRoot normal v normal e normal c left-parenthesis ModifyingAbove normal upper Psi With caret Subscript j Baseline minus normal upper Psi Subscript j Baseline right-parenthesis right-arrow Overscript d Endscripts upper N left-parenthesis 0 comma upper G Subscript j Baseline normal upper Sigma Subscript bold-italic beta Baseline upper G prime Subscript j right-parenthesis j equals 1 comma 2 comma ellipsis

where normal upper Sigma Subscript bold-italic beta is the covariance matrix of the parameter estimates and

upper G Subscript j Baseline equals StartFraction partial-differential normal v normal e normal c left-parenthesis normal upper Psi Subscript j Baseline right-parenthesis Over partial-differential bold-italic beta prime EndFraction equals sigma-summation Underscript i equals 0 Overscript j minus 1 Endscripts bold upper H prime left-parenthesis bold upper A prime right-parenthesis Superscript j minus 1 minus i Baseline circled-times bold upper J bold upper A Superscript i Baseline bold upper J prime

where bold upper H equals left-bracket upper I Subscript k Baseline comma 0 comma ellipsis comma 0 comma upper I Subscript k Baseline comma 0 comma ellipsis comma 0 right-bracket prime is a k left-parenthesis p plus q right-parenthesis times k matrix with the second upper I Subscript k following after p block matrices; bold upper J equals left-bracket upper I Subscript k Baseline comma 0 comma ellipsis comma 0 right-bracket is a k times k left-parenthesis p plus q right-parenthesis matrix; bold upper A is a k left-parenthesis p plus q right-parenthesis times k left-parenthesis p plus q right-parenthesis matrix,

StartLayout 1st Row  bold upper A equals Start 2 By 2 Matrix 1st Row 1st Column upper A 11 2nd Column upper A 12 2nd Row 1st Column upper A 21 2nd Column upper A 22 EndMatrix EndLayout

where

StartLayout 1st Row  upper A 11 equals Start 5 By 5 Matrix 1st Row 1st Column normal upper Phi 1 2nd Column normal upper Phi 2 3rd Column midline-horizontal-ellipsis 4th Column normal upper Phi Subscript p minus 1 Baseline 5th Column normal upper Phi Subscript p Baseline 2nd Row 1st Column upper I Subscript k Baseline 2nd Column 0 3rd Column midline-horizontal-ellipsis 4th Column 0 5th Column 0 3rd Row 1st Column 0 2nd Column upper I Subscript k Baseline 3rd Column midline-horizontal-ellipsis 4th Column 0 5th Column 0 4th Row 1st Column vertical-ellipsis 2nd Column vertical-ellipsis 3rd Column down-right-diagonal-ellipsis 4th Column vertical-ellipsis 5th Column vertical-ellipsis 5th Row 1st Column 0 2nd Column 0 3rd Column midline-horizontal-ellipsis 4th Column upper I Subscript k Baseline 5th Column 0 EndMatrix upper A 12 equals Start 5 By 4 Matrix 1st Row 1st Column minus normal upper Theta 1 2nd Column midline-horizontal-ellipsis 3rd Column minus normal upper Theta Subscript q minus 1 Baseline 4th Column minus normal upper Theta Subscript q Baseline 2nd Row 1st Column 0 2nd Column midline-horizontal-ellipsis 3rd Column 0 4th Column 0 3rd Row 1st Column 0 2nd Column midline-horizontal-ellipsis 3rd Column 0 4th Column 0 4th Row 1st Column vertical-ellipsis 2nd Column down-right-diagonal-ellipsis 3rd Column vertical-ellipsis 4th Column vertical-ellipsis 5th Row 1st Column 0 2nd Column midline-horizontal-ellipsis 3rd Column 0 4th Column 0 EndMatrix EndLayout

    upper A 21 is a k q times k p zero matrix, and

StartLayout 1st Row  upper A 22 equals Start 5 By 5 Matrix 1st Row 1st Column 0 2nd Column 0 3rd Column midline-horizontal-ellipsis 4th Column 0 5th Column 0 2nd Row 1st Column upper I Subscript k Baseline 2nd Column 0 3rd Column midline-horizontal-ellipsis 4th Column 0 5th Column 0 3rd Row 1st Column 0 2nd Column upper I Subscript k Baseline 3rd Column midline-horizontal-ellipsis 4th Column 0 5th Column 0 4th Row 1st Column vertical-ellipsis 2nd Column vertical-ellipsis 3rd Column down-right-diagonal-ellipsis 4th Column vertical-ellipsis 5th Column vertical-ellipsis 5th Row 1st Column 0 2nd Column 0 3rd Column midline-horizontal-ellipsis 4th Column upper I Subscript k Baseline 5th Column 0 EndMatrix EndLayout

An Example of a VARMA(1,1) Model

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

StartLayout 1st Row  bold y Subscript t Baseline equals normal upper Phi 1 bold y Subscript t minus 1 Baseline plus bold-italic epsilon Subscript t Baseline minus normal upper Theta 1 bold-italic epsilon Subscript t minus 1 EndLayout

where bold-italic epsilon Subscript t is the white noise process with a mean zero vector and the positive-definite covariance matrix normal upper Sigma.

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 66 shows the initial values of parameters. The initial values were estimated by using the least squares method.

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

The VARMAX Procedure

Optimization Start
Parameter Estimates
N Parameter Estimate Gradient
Objective
Function
1 AR1_1_1 0.964299 -2.357098
2 AR1_2_1 0.481620 -3.773499
3 AR1_1_2 -0.363819 1.865051
4 AR1_2_2 0.457378 -10.778568
5 MA1_1_1 0.244355 -2.552198
6 MA1_2_1 -0.034093 2.716227
7 MA1_1_2 -0.006261 -0.147004
8 MA1_2_2 0.444636 0.141839
9 COV1_1 1.353584 2.765550
10 COV1_2 0.415649 -1.389416
11 COV2_2 1.445260 2.581735


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

Figure 67: Default Criteria for the quasi-Newton Optimization

Minimum Iterations 0
Maximum Iterations 200
Maximum Function Calls 2000
ABSGCONV Gradient Criterion 0.00001
GCONV Gradient Criterion 1E-8
ABSFCONV Function Criterion 0
FCONV Function Criterion 2.220446E-16
FCONV2 Function Criterion 0
FSIZE Parameter 0
ABSXCONV Parameter Change Criterion 0
XCONV Parameter Change Criterion 0
XSIZE Parameter 0
ABSCONV Function Criterion -1.34078E154
Line Search Method 2
Starting Alpha for Line Search 1
Line Search Precision LSPRECISION 0.4
DAMPSTEP Parameter for Line Search .
Singularity Tolerance (SINGULAR) 1E-8


Figure 68 shows the iteration history of parameter estimates.

Figure 68: Iteration History of Parameter Estimates

Iteration   Restarts Function
Calls
Active
Constraints
  Objective
Function
Objective
Function
Change
Max Abs
Gradient
Element
Step
Size
Slope of
Search
Direction
1   0 3 0   121.22330 0.1526 5.2001 0.00384 -78.688
2   0 5 0   120.97740 0.2459 6.2584 3.214 -0.156
3   0 6 0   120.58286 0.3945 4.1004 0.948 -0.648
4   0 7 0   120.43152 0.1513 3.7834 1.000 -0.346
5   0 8 0   120.32992 0.1016 6.3797 1.000 -0.243
6   0 10 0   120.26832 0.0616 3.1048 0.407 -0.304
7   0 12 0   120.23311 0.0352 1.0747 0.983 -0.0731
8   0 14 0   120.22264 0.0105 0.6370 1.518 -0.0127
9   0 15 0   120.21560 0.00704 1.3563 4.650 -0.0056
10   0 16 0   120.21281 0.00279 1.2963 2.102 -0.0084
11   0 17 0   120.20951 0.00330 0.1634 1.139 -0.0061
12   0 19 0   120.20896 0.000542 0.1349 2.591 -0.0004
13   0 21 0   120.20884 0.000123 0.0662 1.883 -0.0001
14   0 22 0   120.20875 0.000093 0.1399 4.120 -0.0001
15   0 24 0   120.20871 0.000037 0.00917 1.073 -0.0001
16   0 26 0   120.20871 1.643E-6 0.00858 2.115 -155E-8
17   0 27 0   120.20871 7.704E-7 0.00543 5.409 -759E-9


Figure 69 shows the final parameter estimates.

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

The VARMAX Procedure

Optimization Results
Parameter Estimates
N Parameter Estimate Gradient
Objective
Function
1 AR1_1_1 1.020117 0.003641
2 AR1_2_1 0.393557 0.000140
3 AR1_1_2 -0.388708 0.001311
4 AR1_2_2 0.551644 0.002479
5 MA1_1_1 0.330598 0.000131
6 MA1_2_1 -0.166999 0.000086321
7 MA1_1_2 -0.032507 -0.001133
8 MA1_2_2 0.587232 -0.000523
9 COV1_1 1.253624 0.005429
10 COV1_2 0.382094 -0.001152
11 COV2_2 1.322424 -0.000535


Figure 70 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 70: Parameter Estimates for the VARMA(1, 1) Model

The VARMAX Procedure

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

AR
Lag Variable y1 y2
1 y1 1.02012 -0.38871
  y2 0.39356 0.55164

MA
Lag Variable e1 e2
1 y1 0.33060 -0.03251
  y2 -0.16700 0.58723

Schematic Representation
Variable/Lag AR1 MA1
y1 +- +.
y2 ++ .+
+ is > 2*std error,  - is < -2*std error,  . is between,  * is N/A

Model Parameter Estimates
Equation Parameter Estimate Standard
Error
t Value Pr > |t| Variable
y1 AR1_1_1 1.02012 0.10076 10.12 0.0001 y1(t-1)
  AR1_1_2 -0.38871 0.09557 -4.07 0.0001 y2(t-1)
  MA1_1_1 0.33060 0.14389 2.30 0.0237 e1(t-1)
  MA1_1_2 -0.03251 0.14146 -0.23 0.8187 e2(t-1)
y2 AR1_2_1 0.39356 0.10210 3.85 0.0002 y1(t-1)
  AR1_2_2 0.55164 0.08536 6.46 0.0001 y2(t-1)
  MA1_2_1 -0.16700 0.15801 -1.06 0.2931 e1(t-1)
  MA1_2_2 0.58723 0.14372 4.09 0.0001 e2(t-1)

Covariance Parameter Estimates
Parameter Estimate Standard
Error
t Value Pr > |t|
COV1_1 1.25362 0.17788 7.05 0.0001
COV1_2 0.38209 0.13484 2.83 0.0056
COV2_2 1.32242 0.18829 7.02 0.0001


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

StartLayout 1st Row  bold y Subscript t Baseline equals Start 4 By 2 Matrix 1st Row 1st Column 1.01846 2nd Column negative 0.38682 2nd Row 1st Column left-parenthesis 0.10256 right-parenthesis 2nd Column left-parenthesis 0.09644 right-parenthesis 3rd Row 1st Column 0.39182 2nd Column 0.55281 4th Row 1st Column left-parenthesis 0.10062 right-parenthesis 2nd Column left-parenthesis 0.08422 right-parenthesis EndMatrix bold y Subscript t minus 1 Baseline plus bold-italic epsilon Subscript t Baseline minus Start 4 By 2 Matrix 1st Row 1st Column 0.32292 2nd Column negative 0.02160 2nd Row 1st Column left-parenthesis 0.14524 right-parenthesis 2nd Column left-parenthesis 0.14203 right-parenthesis 3rd Row 1st Column negative 0.16501 2nd Column 0.58576 4th Row 1st Column left-parenthesis 0.15704 right-parenthesis 2nd Column left-parenthesis 0.14115 right-parenthesis EndMatrix bold-italic epsilon Subscript t minus 1 EndLayout

and

StartLayout 1st Row  bold-italic epsilon Subscript t Baseline tilde iid upper N left-parenthesis 0 comma Start 4 By 2 Matrix 1st Row 1st Column 1.25202 2nd Column 0.37950 2nd Row 1st Column left-parenthesis 0.17697 right-parenthesis 2nd Column left-parenthesis 0.13401 right-parenthesis 3rd Row 1st Column 0.37950 2nd Column 1.31315 4th Row 1st Column left-parenthesis 0.13401 right-parenthesis 2nd Column left-parenthesis 0.18610 right-parenthesis EndMatrix EndLayout

VARMAX Modeling

A general VARMAX(p comma q comma s) process is written as

StartLayout 1st Row  bold y Subscript t Baseline equals bold-italic delta Subscript t Baseline plus sigma-summation Underscript i equals 1 Overscript p Endscripts normal upper Phi Subscript i Baseline bold y Subscript t minus i Baseline plus bold-italic epsilon Subscript t Baseline minus sigma-summation Underscript i equals 1 Overscript q Endscripts normal upper Theta Subscript i Baseline bold-italic epsilon Subscript t minus i EndLayout

or

StartLayout 1st Row  normal upper Phi left-parenthesis upper B right-parenthesis bold y Subscript t Baseline equals bold-italic delta Subscript t Baseline plus normal upper Theta left-parenthesis upper B right-parenthesis bold-italic epsilon Subscript t EndLayout

where normal upper Phi left-parenthesis upper B right-parenthesis equals upper I Subscript k Baseline minus sigma-summation Underscript i equals 1 Overscript p Endscripts normal upper Phi Subscript i Baseline upper B Superscript i and normal upper Theta left-parenthesis upper B right-parenthesis equals upper I Subscript k Baseline minus sigma-summation Underscript i equals 1 Overscript q Endscripts normal upper Theta Subscript i Baseline upper B Superscript i. The vector bold-italic delta Subscript t consists of all possible deterministic terms, namely constant, seasonal dummies, linear trend, quadratic trend, and exogenous variables. The vector bold-italic delta Subscript t Baseline equals normal upper Delta bold c Subscript t, where bold c Subscript t Baseline equals left-parenthesis upper D prime Subscript t Baseline bold x prime Subscript t Baseline ellipsis bold x prime Subscript t minus s right-parenthesis prime; upper D Subscript t Baseline equals left-parenthesis 1 d Subscript t comma 1 Baseline ellipsis d Subscript t comma n Sub Subscript s Subscript minus 1 Baseline t t squared right-parenthesis prime; d Subscript t comma i Baseline comma i equals 1 comma ellipsis comma n Subscript s Baseline minus 1, are seasonal dummies and n Subscript s is based on the NSEASON= option; normal upper Delta equals left-parenthesis upper A normal upper Theta 0 Superscript asterisk Baseline ellipsis normal upper Theta Subscript s Superscript asterisk Baseline right-parenthesis; A is the parameter matrix corresponding to upper D Subscript t and normal upper Theta Subscript i Superscript asterisk for bold x Subscript t minus i Baseline comma i equals 0 comma ellipsis comma s.

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

bold z Subscript t Baseline equals upper F bold z Subscript t minus 1 Baseline plus bold w Subscript t Baseline plus upper G bold-italic epsilon Subscript t

and an observation equation

bold y Subscript t Baseline equals upper H bold z Subscript t

where

bold z Subscript t Baseline equals left-parenthesis bold y prime Subscript t Baseline comma bold y prime Subscript t minus 1 Baseline comma ellipsis comma bold y prime Subscript t minus left-parenthesis v minus 1 right-parenthesis Baseline comma bold-italic epsilon prime Subscript t Baseline comma bold-italic epsilon Subscript t minus 1 Baseline comma ellipsis comma bold-italic epsilon prime Subscript t minus left-parenthesis q minus 1 right-parenthesis Baseline comma bold c prime Subscript t plus 1 right-parenthesis prime
upper F equals Start 8 By 9 Matrix 1st Row 1st Column normal upper Phi 1 2nd Column midline-horizontal-ellipsis 3rd Column normal upper Phi Subscript v minus 1 Baseline 4th Column normal upper Phi Subscript v Baseline 5th Column minus normal upper Theta 1 6th Column midline-horizontal-ellipsis 7th Column minus normal upper Theta Subscript q minus 1 Baseline 8th Column minus normal upper Theta Subscript q Baseline 9th Column normal upper Delta 2nd Row 1st Column upper I Subscript k Baseline 2nd Column midline-horizontal-ellipsis 3rd Column 0 4th Column 0 5th Column 0 6th Column midline-horizontal-ellipsis 7th Column 0 8th Column 0 9th Column 0 3rd Row 1st Column vertical-ellipsis 2nd Column down-right-diagonal-ellipsis 3rd Column 0 4th Column vertical-ellipsis 5th Column vertical-ellipsis 6th Column down-right-diagonal-ellipsis 7th Column vertical-ellipsis 8th Column vertical-ellipsis 9th Column vertical-ellipsis 4th Row 1st Column 0 2nd Column midline-horizontal-ellipsis 3rd Column upper I Subscript k Baseline 4th Column 0 5th Column 0 6th Column midline-horizontal-ellipsis 7th Column 0 8th Column 0 9th Column 0 5th Row 1st Column 0 2nd Column midline-horizontal-ellipsis 3rd Column 0 4th Column 0 5th Column 0 6th Column midline-horizontal-ellipsis 7th Column 0 8th Column 0 9th Column 0 6th Row 1st Column 0 2nd Column midline-horizontal-ellipsis 3rd Column 0 4th Column 0 5th Column upper I Subscript k Baseline 6th Column midline-horizontal-ellipsis 7th Column 0 8th Column 0 9th Column 0 7th Row 1st Column vertical-ellipsis 2nd Column down-right-diagonal-ellipsis 3rd Column 0 4th Column vertical-ellipsis 5th Column vertical-ellipsis 6th Column down-right-diagonal-ellipsis 7th Column vertical-ellipsis 8th Column vertical-ellipsis 9th Column vertical-ellipsis 8th Row 1st Column 0 2nd Column midline-horizontal-ellipsis 3rd Column 0 4th Column 0 5th Column 0 6th Column midline-horizontal-ellipsis 7th Column upper I Subscript k Baseline 8th Column 0 9th Column 0 EndMatrix comma upper G equals Start 5 By 1 Matrix 1st Row  upper I Subscript k Baseline 2nd Row  0 Subscript k left-parenthesis v minus 1 right-parenthesis times k Baseline 3rd Row  upper I Subscript k Baseline 4th Row  0 Subscript k left-parenthesis q minus 1 right-parenthesis times k Baseline 5th Row  0 Subscript u times k Baseline EndMatrix

and

upper H equals left-bracket upper I Subscript k Baseline comma 0 Subscript left-parenthesis k left-parenthesis v plus q minus 1 right-parenthesis plus u right-parenthesis times k Baseline right-bracket

where v equals max left-parenthesis p comma 1 right-parenthesis, normal upper Phi Subscript i Baseline equals 0 for i greater-than p, and u is the dimension of c Subscript t.

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

ModifyingAbove bold z With caret Subscript t vertical-bar t Baseline equals ModifyingAbove bold z With caret Subscript t vertical-bar t minus 1 Baseline plus upper K Subscript t Baseline bold-italic epsilon Subscript t vertical-bar t minus 1

where

upper K Subscript t Baseline equals upper P Subscript t vertical-bar t minus 1 Baseline upper H prime left-bracket upper H upper P Subscript t vertical-bar t minus 1 Baseline upper H prime right-bracket Superscript negative 1

The prediction equation is

ModifyingAbove bold z With caret Subscript t vertical-bar t minus 1 Baseline equals upper F ModifyingAbove bold z With caret Subscript t minus 1 vertical-bar t minus 1 Baseline plus bold w Subscript t Baseline comma upper P Subscript t vertical-bar t minus 1 Baseline equals upper F upper P Subscript t minus 1 vertical-bar t minus 1 Baseline upper F Superscript prime Baseline plus upper G normal upper Sigma upper G prime

where upper P Subscript t vertical-bar t Baseline equals left-bracket upper I minus upper K Subscript t Baseline upper H right-bracket upper P Subscript t vertical-bar t minus 1 for t equals 1 comma 2 comma ellipsis comma n.

The log-likelihood function can be expressed as

script l equals minus one-half sigma-summation Underscript t equals 1 Overscript upper T Endscripts left-bracket log StartAbsoluteValue normal upper Sigma Subscript t vertical-bar t minus 1 Baseline EndAbsoluteValue plus left-parenthesis bold y Subscript t Baseline minus ModifyingAbove bold y With caret Subscript t vertical-bar t minus 1 Baseline right-parenthesis prime normal upper Sigma Subscript t vertical-bar t minus 1 Superscript negative 1 Baseline left-parenthesis bold y Subscript t Baseline minus ModifyingAbove bold y With caret Subscript t vertical-bar t minus 1 Baseline right-parenthesis right-bracket

where ModifyingAbove bold y With caret Subscript t vertical-bar t minus 1 and normal upper Sigma Subscript t vertical-bar t minus 1 are determined recursively from Kalman filtering. To construct the likelihood function from Kalman filtering, you obtain ModifyingAbove bold y With caret Subscript t vertical-bar t minus 1 Baseline equals upper H ModifyingAbove bold z With caret Subscript t vertical-bar t minus 1, ModifyingAbove bold-italic epsilon With caret Subscript t vertical-bar t minus 1 Baseline equals bold y Subscript t Baseline minus ModifyingAbove bold y With caret Subscript t vertical-bar t minus 1, and normal upper Sigma Subscript t vertical-bar t minus 1 Baseline equals upper H upper P Subscript t vertical-bar t minus 1 Baseline upper H prime.

In the preceding state space form of a VARMAX model, the exogenous variables are treated as determined terms, which implies that the values of the exogenous variables must be provided to forecast the out-of-sample dependent variables. If you do not have the future values of the exogenous variables, either you predict the exogenous variables in a separate model, or you express both the exogenous variables and the dependent variables in one combined model and predict them together (Reinsel 1997).

The dimension of the state space vector of the Kalman filtering method for the VARMAX(p,q,s) model might be large, so it might take 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;
Last updated: June 19, 2025