VARMAX Procedure

VAR and VARX Modeling

The pth-order VAR process is written as

StartLayout 1st Row  bold y Subscript t Baseline minus bold-italic mu equals sigma-summation Underscript i equals 1 Overscript p Endscripts normal upper Phi Subscript i Baseline left-parenthesis bold y Subscript t minus i Baseline minus bold-italic mu right-parenthesis plus bold-italic epsilon Subscript t Baseline normal o normal r normal upper Phi left-parenthesis upper B right-parenthesis left-parenthesis bold y Subscript t Baseline minus bold-italic mu right-parenthesis equals bold-italic epsilon Subscript t Baseline EndLayout

with 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.

Equivalently, it can be written as

StartLayout 1st Row  bold y Subscript t Baseline equals bold-italic delta 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 normal o normal r normal upper Phi left-parenthesis upper B right-parenthesis bold y Subscript t Baseline equals bold-italic delta plus bold-italic epsilon Subscript t Baseline EndLayout

with bold-italic delta equals left-parenthesis upper I Subscript k Baseline minus sigma-summation Underscript i equals 1 Overscript p Endscripts normal upper Phi Subscript i Baseline right-parenthesis bold-italic mu.

Stationarity

For stationarity, the VAR process must be expressible in the convergent causal infinite MA form as

StartLayout 1st Row  bold y Subscript t Baseline equals bold-italic mu plus sigma-summation Underscript j equals 0 Overscript normal infinity Endscripts normal upper Psi Subscript j Baseline bold-italic epsilon Subscript t minus j EndLayout

where normal upper Psi left-parenthesis upper B right-parenthesis equals normal upper Phi left-parenthesis upper B right-parenthesis Superscript negative 1 Baseline equals sigma-summation Underscript j equals 0 Overscript normal infinity Endscripts normal upper Psi Subscript j Baseline upper B Superscript j with sigma-summation Underscript j equals 0 Overscript normal infinity Endscripts StartAbsoluteValue EndAbsoluteValue normal upper Psi Subscript j Baseline StartAbsoluteValue EndAbsoluteValue less-than normal infinity, where StartAbsoluteValue EndAbsoluteValue upper A StartAbsoluteValue EndAbsoluteValue denotes a norm for the matrix A such as StartAbsoluteValue EndAbsoluteValue upper A StartAbsoluteValue EndAbsoluteValue squared equals normal t normal r StartSet upper A prime upper A EndSet. The matrix normal upper Psi Subscript j can be recursively obtained from the relation normal upper Phi left-parenthesis upper B right-parenthesis normal upper Psi left-parenthesis upper B right-parenthesis equals upper I; it is

StartLayout 1st Row  normal upper Psi Subscript j Baseline equals normal upper Phi 1 normal upper Psi Subscript j minus 1 Baseline plus normal upper Phi 2 normal upper Psi Subscript j minus 2 Baseline plus midline-horizontal-ellipsis plus normal upper Phi Subscript p Baseline normal upper Psi Subscript j minus p EndLayout

where normal upper Psi 0 equals upper I Subscript k and normal upper Psi Subscript j Baseline equals 0 for j less-than 0.

The stationarity condition is satisfied if all roots of StartAbsoluteValue normal upper Phi left-parenthesis z right-parenthesis EndAbsoluteValue equals 0 are outside of the unit circle. The stationarity condition is equivalent to the condition in the corresponding VAR(1) representation, bold upper Y Subscript t Baseline equals normal upper Phi bold upper Y Subscript t minus 1 Baseline plus bold-italic epsilon Subscript t, that all eigenvalues of the k p times k p companion matrix normal upper Phi be less than one in absolute value, where bold upper Y Subscript t Baseline equals left-parenthesis bold y prime Subscript t Baseline comma ellipsis comma bold y prime Subscript t minus p plus 1 right-parenthesis prime, bold-italic epsilon Subscript t Baseline equals left-parenthesis bold-italic epsilon prime Subscript t Baseline comma 0 prime comma ellipsis comma 0 Superscript prime Baseline right-parenthesis prime, and

StartLayout 1st Row  normal upper Phi 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 EndLayout

If the stationarity condition is not satisfied, a nonstationary model (a differenced model or an error correction model) might be more appropriate.

The following statements estimate a VAR(1) model and use the ROOTS option to compute the characteristic polynomial roots:

proc varmax data=simul1;
   model y1 y2 / p=1 noint print=(roots);
run;

Figure 63 shows the output associated with the ROOTS option, which indicates that the series is stationary since the modulus of the eigenvalue is less than one.

Figure 63: Stationarity (ROOTS Option)

The VARMAX Procedure

Roots of AR Characteristic Polynomial
Index Real Imaginary Modulus Radian Degree
1 0.77238 0.35899 0.8517 0.4351 24.9284
2 0.77238 -0.35899 0.8517 -0.4351 -24.9284


Parameter Estimation

Consider the stationary VAR(p) model

StartLayout 1st Row  bold y Subscript t Baseline equals bold-italic delta 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 EndLayout

where bold y Subscript negative p plus 1 Baseline comma ellipsis comma bold y 0 are assumed to be available (for convenience of notation). This can be represented by the general form of the multivariate linear model,

StartLayout 1st Row  upper Y equals upper X upper B plus upper E or bold y equals left-parenthesis upper X circled-times upper I Subscript k Baseline right-parenthesis bold-italic beta plus bold e EndLayout

where

StartLayout 1st Row 1st Column upper Y 2nd Column equals 3rd Column left-parenthesis bold y 1 comma ellipsis comma bold y Subscript upper T Baseline right-parenthesis prime 2nd Row 1st Column upper B 2nd Column equals 3rd Column left-parenthesis bold-italic delta comma normal upper Phi 1 comma ellipsis comma normal upper Phi Subscript p Baseline right-parenthesis prime 3rd Row 1st Column upper X 2nd Column equals 3rd Column left-parenthesis upper X 0 comma ellipsis comma upper X Subscript upper T minus 1 Baseline right-parenthesis prime 4th Row 1st Column upper X Subscript t 2nd Column equals 3rd Column left-parenthesis 1 comma bold y prime Subscript t Baseline comma ellipsis comma bold y prime Subscript t minus p plus 1 right-parenthesis prime 5th Row 1st Column upper E 2nd Column equals 3rd Column left-parenthesis bold-italic epsilon 1 comma ellipsis comma bold-italic epsilon Subscript upper T Baseline right-parenthesis prime 6th Row 1st Column bold y 2nd Column equals 3rd Column vec left-parenthesis upper Y Superscript prime Baseline right-parenthesis 7th Row 1st Column bold-italic beta 2nd Column equals 3rd Column vec left-parenthesis upper B Superscript prime Baseline right-parenthesis 8th Row 1st Column bold e 2nd Column equals 3rd Column vec left-parenthesis upper E prime right-parenthesis EndLayout

with vec denoting the column stacking operator.

The conditional least squares estimator of bold-italic beta is

ModifyingAbove bold-italic beta With caret equals left-parenthesis left-parenthesis upper X prime upper X right-parenthesis Superscript negative 1 Baseline upper X prime circled-times upper I Subscript k Baseline right-parenthesis bold y

and the estimate of normal upper Sigma is

ModifyingAbove normal upper Sigma With caret equals left-parenthesis upper T minus left-parenthesis k p plus 1 right-parenthesis right-parenthesis Superscript negative 1 Baseline sigma-summation Underscript t equals 1 Overscript upper T Endscripts ModifyingAbove bold-italic epsilon Subscript t Baseline With caret ModifyingAbove bold-italic epsilon Subscript t Baseline With caret prime

where ModifyingAbove bold-italic epsilon Subscript t Baseline With caret is the residual vectors. Consistency and asymptotic normality of the LS estimator are that

StartRoot upper T EndRoot left-parenthesis ModifyingAbove bold-italic beta With caret minus bold-italic beta right-parenthesis right-arrow Overscript d Endscripts upper N left-parenthesis 0 comma normal upper Gamma Subscript p Superscript negative 1 Baseline circled-times normal upper Sigma right-parenthesis

where upper X prime upper X slash upper T converges in probability to normal upper Gamma Subscript p and right-arrow Overscript d Endscripts denotes convergence in distribution.

The (conditional) maximum likelihood estimator in the VAR(p) model is equal to the (conditional) least squares estimator on the assumption of normality of the error vectors.

Asymptotic Distributions of Impulse Response Functions

As before, vec denotes the column stacking operator and vech is the corresponding operator that stacks the elements on and below the diagonal. For any k times k matrix A, the commutation matrix upper K Subscript k is defined as upper K Subscript k Baseline normal v normal e normal c left-parenthesis upper A right-parenthesis equals normal v normal e normal c left-parenthesis upper A prime right-parenthesis; the duplication matrix upper D Subscript k is defined as upper D Subscript k Baseline normal v normal e normal c normal h left-parenthesis upper A right-parenthesis equals normal v normal e normal c left-parenthesis upper A right-parenthesis; the elimination matrix upper L Subscript k is defined as upper L Subscript k Baseline normal v normal e normal c left-parenthesis upper A right-parenthesis equals normal v normal e normal c normal h left-parenthesis upper A right-parenthesis.

The asymptotic distribution of the impulse response function (Lütkepohl 1993) 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 Baseline equals normal upper Gamma Subscript p Superscript negative 1 Baseline circled-times normal upper Sigma 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 J left-parenthesis bold upper Phi prime right-parenthesis Superscript j minus 1 minus i Baseline circled-times normal upper Psi Subscript i

where bold upper J equals left-bracket upper I Subscript k Baseline comma 0 comma ellipsis comma 0 right-bracket is a k times k p matrix and bold upper Phi is a k p times k p companion matrix.

The asymptotic distribution of the accumulated impulse response function is

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

where upper F Subscript l Baseline equals sigma-summation Underscript j equals 1 Overscript l Endscripts upper G Subscript j.

The asymptotic distribution of the orthogonalized impulse response function is

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

where upper C 0 equals 0, upper C Subscript j Baseline equals left-parenthesis normal upper Psi 0 Superscript o prime Baseline circled-times upper I Subscript k Baseline right-parenthesis upper G Subscript j, upper C Subscript j Baseline overbar equals left-parenthesis upper I Subscript k Baseline circled-times normal upper Psi Subscript j Baseline right-parenthesis upper H,

upper H equals StartFraction partial-differential normal v normal e normal c left-parenthesis normal upper Psi 0 Superscript o Baseline right-parenthesis Over partial-differential bold-italic sigma prime EndFraction equals upper L prime Subscript k Baseline StartSet upper L Subscript k Baseline left-parenthesis upper I Subscript k squared Baseline plus upper K Subscript k Baseline right-parenthesis left-parenthesis normal upper Psi 0 Superscript o Baseline circled-times upper I Subscript k Baseline right-parenthesis upper L prime Subscript k EndSet Superscript negative 1

and normal upper Sigma Subscript bold-italic sigma Baseline equals 2 upper D Subscript k Superscript plus Baseline left-parenthesis normal upper Sigma circled-times normal upper Sigma right-parenthesis upper D Subscript k Superscript plus prime with upper D Subscript k Superscript plus Baseline equals left-parenthesis upper D prime Subscript k Baseline upper D Subscript k Baseline right-parenthesis Superscript negative 1 Baseline upper D prime Subscript k and bold-italic sigma equals normal v normal e normal c normal h left-parenthesis normal upper Sigma right-parenthesis.

Granger Causality Test

Let bold y Subscript t be arranged and partitioned in subgroups bold y Subscript 1 t and bold y Subscript 2 t with dimensions k 1 and k 2, respectively (k equals k 1 plus k 2); that is, bold y Subscript t Baseline equals left-parenthesis bold y prime Subscript 1 t Baseline comma bold y prime Subscript 2 t right-parenthesis prime with the corresponding white noise process bold-italic epsilon Subscript t Baseline equals left-parenthesis bold-italic epsilon prime Subscript 1 t Baseline comma bold-italic epsilon prime Subscript 2 t right-parenthesis prime. Consider the VAR(p) model with partitioned coefficients normal upper Phi Subscript i j Baseline left-parenthesis upper B right-parenthesis for i comma j equals 1 comma 2 as follows:

StartLayout 1st Row  Start 2 By 2 Matrix 1st Row 1st Column normal upper Phi 11 left-parenthesis upper B right-parenthesis 2nd Column normal upper Phi 12 left-parenthesis upper B right-parenthesis 2nd Row 1st Column normal upper Phi 21 left-parenthesis upper B right-parenthesis 2nd Column normal upper Phi 22 left-parenthesis upper B right-parenthesis EndMatrix StartBinomialOrMatrix bold y Subscript 1 t Baseline Choose bold y Subscript 2 t Baseline EndBinomialOrMatrix equals StartBinomialOrMatrix bold-italic delta 1 Choose bold-italic delta 2 EndBinomialOrMatrix plus StartBinomialOrMatrix bold-italic epsilon Subscript 1 t Baseline Choose bold-italic epsilon Subscript 2 t EndBinomialOrMatrix EndLayout

The variables bold y Subscript 1 t are said to cause bold y Subscript 2 t, but bold y Subscript 2 t do not cause bold y Subscript 1 t if normal upper Phi 12 left-parenthesis upper B right-parenthesis equals 0. The implication of this model structure is that future values of the process bold y Subscript 1 t are influenced only by its own past and not by the past of bold y Subscript 2 t, where future values of bold y Subscript 2 t are influenced by the past of both bold y Subscript 1 t and bold y Subscript 2 t. If the future bold y Subscript 1 t are not influenced by the past values of bold y Subscript 2 t, then it can be better to model bold y Subscript 1 t separately from bold y Subscript 2 t.

Consider testing upper H 0 colon upper C bold-italic beta equals c, where C is a s times left-parenthesis k squared p plus k right-parenthesis matrix of rank s and c is an s-dimensional vector where s equals k 1 k 2 p. Assuming that

StartRoot upper T EndRoot left-parenthesis ModifyingAbove bold-italic beta With caret minus bold-italic beta right-parenthesis right-arrow Overscript d Endscripts upper N left-parenthesis 0 comma normal upper Gamma Subscript p Superscript negative 1 Baseline circled-times normal upper Sigma right-parenthesis

you get the Wald statistic

upper T left-parenthesis upper C ModifyingAbove bold-italic beta With caret minus c right-parenthesis prime left-bracket upper C left-parenthesis ModifyingAbove normal upper Gamma With caret Subscript p Baseline Superscript negative 1 Baseline circled-times ModifyingAbove normal upper Sigma With caret right-parenthesis upper C prime right-bracket Superscript negative 1 Baseline left-parenthesis upper C ModifyingAbove bold-italic beta With caret minus c right-parenthesis right-arrow Overscript d Endscripts chi squared left-parenthesis s right-parenthesis

For the Granger causality test, the matrix C consists of zeros or ones and c is the zero vector. For more information about the Granger causality test, see Lütkepohl (1993).

VARX Modeling

The vector autoregressive model with exogenous variables is called the VARX(p,s) model. The form of the VARX(p,s) model can be written as

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

The parameter estimates can be obtained by representing the general form of the multivariate linear model,

StartLayout 1st Row  upper Y equals upper X upper B plus upper E or bold y equals left-parenthesis upper X circled-times upper I Subscript k Baseline right-parenthesis bold-italic beta plus bold e EndLayout

where

StartLayout 1st Row 1st Column upper Y 2nd Column equals 3rd Column left-parenthesis bold y 1 comma ellipsis comma bold y Subscript upper T Baseline right-parenthesis prime 2nd Row 1st Column upper B 2nd Column equals 3rd Column left-parenthesis bold-italic delta comma normal upper Phi 1 comma ellipsis comma normal upper Phi Subscript p Baseline comma normal upper Theta 0 Superscript asterisk Baseline comma ellipsis comma normal upper Theta Subscript s Superscript asterisk Baseline right-parenthesis prime 3rd Row 1st Column upper X 2nd Column equals 3rd Column left-parenthesis upper X 0 comma ellipsis comma upper X Subscript upper T minus 1 Baseline right-parenthesis prime 4th Row 1st Column upper X Subscript t 2nd Column equals 3rd Column left-parenthesis 1 comma bold y prime Subscript t Baseline comma ellipsis comma bold y prime Subscript t minus p plus 1 Baseline comma bold x prime Subscript t plus 1 Baseline comma ellipsis comma bold x prime Subscript t minus s plus 1 right-parenthesis prime 5th Row 1st Column upper E 2nd Column equals 3rd Column left-parenthesis bold-italic epsilon 1 comma ellipsis comma bold-italic epsilon Subscript upper T Baseline right-parenthesis prime 6th Row 1st Column bold y 2nd Column equals 3rd Column vec left-parenthesis upper Y Superscript prime Baseline right-parenthesis 7th Row 1st Column bold-italic beta 2nd Column equals 3rd Column vec left-parenthesis upper B Superscript prime Baseline right-parenthesis 8th Row 1st Column bold e 2nd Column equals 3rd Column vec left-parenthesis upper E prime right-parenthesis EndLayout

The conditional least squares estimator of beta can be obtained by using the same method in a VAR(p) modeling. If the multivariate linear model has different independent variables that correspond to dependent variables, the SUR (seemingly unrelated regression) method is used to improve the regression estimates.

The following example fits the ordinary regression model:

proc varmax data=one;
   model y1-y3 = x1-x5;
run;

This is equivalent to the REG procedure in the SAS/STAT software:

proc reg data=one;
   model y1 = x1-x5;
   model y2 = x1-x5;
   model y3 = x1-x5;
run;

The following example fits the second-order lagged regression model:

proc varmax data=two;
   model y1 y2 = x / xlag=2;
run;

This is equivalent to the REG procedure in the SAS/STAT software:

data three;
   set two;
   xlag1 = lag1(x);
   xlag2 = lag2(x);
run;

proc reg data=three;
   model y1 = x xlag1 xlag2;
   model y2 = x xlag1 xlag2;
run;

The following example fits the ordinary regression model with different regressors:

proc varmax data=one;
   model y1 = x1-x3, y2 = x2 x3;
run;

This is equivalent to the following SYSLIN procedure statements:

proc syslin data=one vardef=df sur;
   endogenous y1 y2;
   model y1 = x1-x3;
   model y2 = x2 x3;
run;

From the output in Figure 25 in the section Getting Started: VARMAX Procedure, you can see that the parameters, XL0_1_2, XL0_2_1, XL0_3_1, and XL0_3_2 associated with the exogenous variables, are not significant. The following example fits the VARX(1,0) model with different regressors:

proc varmax data=grunfeld;
   model y1 = x1, y2 = x2, y3 / p=1 print=(estimates);
run;

Figure 64: Parameter Estimates for the VARX(1, 0) Model

The VARMAX Procedure

XLag
Lag Variable x1 x2
0 y1 1.83231 _
  y2 _ 2.42110
  y3 _ _


As you can see in Figure 64, the symbol ‘_’ in the elements of matrix corresponds to endogenous variables that do not take the denoted exogenous variables.

Last updated: June 19, 2025