VARMAX Procedure

Forecasting

The optimal (minimum MSE) l-step-ahead forecast of bold y Subscript t plus l is

StartLayout 1st Row 1st Column bold y Subscript t plus l vertical-bar t 2nd Column equals 3rd Column sigma-summation Underscript j equals 1 Overscript p Endscripts normal upper Phi Subscript j Baseline bold y Subscript t plus l minus j vertical-bar t Baseline plus sigma-summation Underscript j equals 0 Overscript s Endscripts normal upper Theta Subscript j Superscript asterisk Baseline bold x Subscript t plus l minus j vertical-bar t Baseline minus sigma-summation Underscript j equals l Overscript q Endscripts normal upper Theta Subscript j Baseline bold-italic epsilon Subscript t plus l minus j Baseline comma l less-than-or-equal-to q 2nd Row 1st Column bold y Subscript t plus l vertical-bar t 2nd Column equals 3rd Column sigma-summation Underscript j equals 1 Overscript p Endscripts normal upper Phi Subscript j Baseline bold y Subscript t plus l minus j vertical-bar t Baseline plus sigma-summation Underscript j equals 0 Overscript s Endscripts normal upper Theta Subscript j Superscript asterisk Baseline bold x Subscript t plus l minus j vertical-bar t Baseline comma l greater-than q EndLayout

where bold y Subscript t plus l minus j vertical-bar t Baseline equals bold y Subscript t plus l minus j and bold x Subscript t plus l minus j vertical-bar t Baseline equals bold x Subscript t plus l minus j for l less-than-or-equal-to j. For information about the forecasts bold x Subscript t plus l minus j vertical-bar t, see the section State Space Representation.

Covariance Matrices of Prediction Errors without Exogenous (Independent) Variables

Under the stationarity assumption, the optimal (minimum MSE) l-step-ahead forecast of bold y Subscript t plus l has an infinite moving-average form, bold y Subscript t plus l vertical-bar t Baseline equals sigma-summation Underscript j equals l Overscript normal infinity Endscripts normal upper Psi Subscript j Baseline bold-italic epsilon Subscript t plus l minus j. The prediction error of the optimal l-step-ahead forecast is bold e Subscript t plus l vertical-bar t Baseline equals bold y Subscript t plus l Baseline minus bold y Subscript t plus l vertical-bar t Baseline equals sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Psi Subscript j Baseline bold-italic epsilon Subscript t plus l minus j, with zero mean and covariance matrix,

normal upper Sigma left-parenthesis l right-parenthesis equals normal upper C normal o normal v left-parenthesis bold e Subscript t plus l vertical-bar t Baseline right-parenthesis equals sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Psi Subscript j Baseline normal upper Sigma normal upper Psi Subscript j Superscript prime Baseline equals sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Psi Subscript j Superscript o Baseline normal upper Psi Subscript j Superscript o prime

where normal upper Psi Subscript j Superscript o Baseline equals normal upper Psi Subscript j Baseline upper P with a lower triangular matrix P such that normal upper Sigma equals upper P upper P prime. Under the assumption of normality of the bold-italic epsilon Subscript t, the l-step-ahead prediction error bold e Subscript t plus l vertical-bar t is also normally distributed as multivariate upper N left-parenthesis 0 comma normal upper Sigma left-parenthesis l right-parenthesis right-parenthesis. Hence, it follows that the diagonal elements sigma Subscript i i Superscript 2 Baseline left-parenthesis l right-parenthesis of normal upper Sigma left-parenthesis l right-parenthesis can be used, together with the point forecasts y Subscript i comma t plus l vertical-bar t, to construct l-step-ahead prediction intervals of the future values of the component series, y Subscript i comma t plus l.

The following statements use the COVPE option to compute the covariance matrices of the prediction errors for a VAR(1) model. The parts of the VARMAX procedure output are shown in Figure 55 and Figure 56.

proc varmax data=simul1;
   model y1 y2 / p=1 noint lagmax=5
                 printform=both
                 print=(decompose(5) impulse=(all) covpe(5));
run;

Figure 55 is the output in a matrix format associated with the COVPE option for the prediction error covariance matrices.

Figure 55: Covariances of Prediction Errors (COVPE Option)

The VARMAX Procedure

Prediction Error Covariances
Lead Variable y1 y2
1 y1 1.28875 0.39751
  y2 0.39751 1.41839
2 y1 2.92119 1.00189
  y2 1.00189 2.18051
3 y1 4.59984 1.98771
  y2 1.98771 3.03498
4 y1 5.91299 3.04856
  y2 3.04856 4.07738
5 y1 6.69463 3.85346
  y2 3.85346 5.07010


Figure 56 is the output in a univariate format associated with the COVPE option for the prediction error covariances. This printing format more easily explains the prediction error covariances of each variable.

Figure 56: Covariances of Prediction Errors

Prediction Error Covariances by Variable
Variable Lead y1 y2
y1 1 1.28875 0.39751
  2 2.92119 1.00189
  3 4.59984 1.98771
  4 5.91299 3.04856
  5 6.69463 3.85346
y2 1 0.39751 1.41839
  2 1.00189 2.18051
  3 1.98771 3.03498
  4 3.04856 4.07738
  5 3.85346 5.07010


Covariance Matrices of Prediction Errors in the Presence of Exogenous (Independent) Variables

Exogenous variables can be both stochastic and nonstochastic (deterministic) variables. Considering the forecasts in the VARMAX(p,q,s) model, there are two cases.

When exogenous (independent) variables are stochastic (future values not specified):

As defined in the section State Space Representation, bold y Subscript t plus l vertical-bar t has the representation

bold y Subscript t plus l vertical-bar t Baseline equals sigma-summation Underscript j equals l Overscript normal infinity Endscripts upper V Subscript j Baseline bold a Subscript t plus l minus j Baseline plus sigma-summation Underscript j equals l Overscript normal infinity Endscripts normal upper Psi Subscript j Baseline bold-italic epsilon Subscript t plus l minus j

and hence

bold e Subscript t plus l vertical-bar t Baseline equals sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts upper V Subscript j Baseline bold a Subscript t plus l minus j Baseline plus sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Psi Subscript j Baseline bold-italic epsilon Subscript t plus l minus j

Therefore, the covariance matrix of the l-step-ahead prediction error is given as

normal upper Sigma left-parenthesis l right-parenthesis equals normal upper C normal o normal v left-parenthesis bold e Subscript t plus l vertical-bar t Baseline right-parenthesis equals sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts upper V Subscript j Baseline normal upper Sigma Subscript a Baseline upper V Subscript j Superscript prime Baseline plus sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Psi Subscript j Baseline normal upper Sigma Subscript epsilon Baseline normal upper Psi prime Subscript j

where normal upper Sigma Subscript a is the covariance of the white noise series bold a Subscript t, and bold a Subscript t is the white noise series for the VARMA(p,q) model of exogenous (independent) variables, which is assumed not to be correlated with bold-italic epsilon Subscript t or its lags.

When future exogenous (independent) variables are specified:

The optimal forecast bold y Subscript t plus l vertical-bar t of bold y Subscript t conditioned on the past information and also on known future values bold x Subscript t plus 1 Baseline comma ellipsis comma bold x Subscript t plus l Baseline can be represented as

bold y Subscript t plus l vertical-bar t Baseline equals sigma-summation Underscript j equals 0 Overscript normal infinity Endscripts normal upper Psi Subscript j Superscript asterisk Baseline bold x Subscript t plus l minus j Baseline plus sigma-summation Underscript j equals l Overscript normal infinity Endscripts normal upper Psi Subscript j Baseline bold-italic epsilon Subscript t plus l minus j

and the forecast error is

bold e Subscript t plus l vertical-bar t Baseline equals sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Psi Subscript j Baseline bold-italic epsilon Subscript t plus l minus j

Thus, the covariance matrix of the l-step-ahead prediction error is given as

normal upper Sigma left-parenthesis l right-parenthesis equals normal upper C normal o normal v left-parenthesis bold e Subscript t plus l vertical-bar t Baseline right-parenthesis equals sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Psi Subscript j Baseline normal upper Sigma Subscript epsilon Baseline normal upper Psi prime Subscript j

Decomposition of Prediction Error Covariances

In the relation normal upper Sigma left-parenthesis l right-parenthesis equals sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Psi Subscript j Superscript o Baseline normal upper Psi Subscript j Superscript o prime, the diagonal elements can be interpreted as providing a decomposition of the l-step-ahead prediction error covariance sigma Subscript i i Superscript 2 Baseline left-parenthesis l right-parenthesis for each component series y Subscript i t into contributions from the components of the standardized innovations bold-italic epsilon Subscript t.

If you denote the (i, n) element of normal upper Psi Subscript j Superscript o by psi Subscript j comma i n, the MSE of y Subscript i comma t plus h vertical-bar t is

normal upper M normal upper S normal upper E left-parenthesis y Subscript i comma t plus h vertical-bar t Baseline right-parenthesis equals normal upper E left-parenthesis y Subscript i comma t plus h Baseline minus y Subscript i comma t plus h vertical-bar t Baseline right-parenthesis squared equals sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts sigma-summation Underscript n equals 1 Overscript k Endscripts psi Subscript j comma i n Superscript 2

Note that sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts psi Subscript j comma i n Superscript 2 is interpreted as the contribution of innovations in variable n to the prediction error covariance of the l-step-ahead forecast of variable i.

The proportion, omega Subscript l comma i n, of the l-step-ahead forecast error covariance of variable i accounting for the innovations in variable n is

omega Subscript l comma i n Baseline equals sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts psi Subscript j comma i n Superscript 2 Baseline slash normal upper M normal upper S normal upper E left-parenthesis y Subscript i comma t plus h vertical-bar t Baseline right-parenthesis

The following statements use the DECOMPOSE option to compute the decomposition of prediction error covariances and their proportions for a VAR(1) model:

proc varmax data=simul1;
   model y1 y2 / p=1 noint print=(decompose(15))
                 printform=univariate;
run;

The proportions of decomposition of prediction error covariances of two variables are given in Figure 57. The output explains that about 91.356% of the one-step-ahead prediction error covariances of the variable y Subscript 2 t is accounted for by its own innovations and about 8.644% is accounted for by y Subscript 1 t innovations.

Figure 57: Decomposition of Prediction Error Covariances (DECOMPOSE Option)

Proportions of Prediction Error Covariances
by Variable
Variable Lead y1 y2
y1 1 1.00000 0.00000
  2 0.88436 0.11564
  3 0.75132 0.24868
  4 0.64897 0.35103
  5 0.58460 0.41540
y2 1 0.08644 0.91356
  2 0.31767 0.68233
  3 0.50247 0.49753
  4 0.55607 0.44393
  5 0.53549 0.46451


Forecasting of the Centered Series

If the CENTER option is specified, the sample mean vector is added to the forecast.

Forecasting of the Differenced Series

If dependent (endogenous) variables are differenced, the final forecasts and their prediction error covariances are produced by integrating those of the differenced series. However, if the PRIOR option is specified, the forecasts and their prediction error variances of the differenced series are produced.

Let bold z Subscript t be the original series with some appended zero values that correspond to the unobserved past observations. Let normal upper Delta left-parenthesis upper B right-parenthesis be the k times k matrix polynomial in the backshift operator that corresponds to the differencing specified by the MODEL statement. The off-diagonal elements of normal upper Delta Subscript i are zero, and the diagonal elements can be different. Then bold y Subscript t Baseline equals normal upper Delta left-parenthesis upper B right-parenthesis bold z Subscript t.

This gives the relationship

bold z Subscript t Baseline equals normal upper Delta Superscript negative 1 Baseline left-parenthesis upper B right-parenthesis bold y Subscript t Baseline equals sigma-summation Underscript j equals 0 Overscript normal infinity Endscripts normal upper Lamda Subscript j Baseline bold y Subscript t minus j

where normal upper Delta Superscript negative 1 Baseline left-parenthesis upper B right-parenthesis equals sigma-summation Underscript j equals 0 Overscript normal infinity Endscripts normal upper Lamda Subscript j Baseline upper B Superscript j and normal upper Lamda 0 equals upper I Subscript k.

The l-step-ahead prediction of bold z Subscript t plus l is

bold z Subscript t plus l vertical-bar t Baseline equals sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Lamda Subscript j Baseline bold y Subscript t plus l minus j vertical-bar t Baseline plus sigma-summation Underscript j equals l Overscript normal infinity Endscripts normal upper Lamda Subscript j Baseline bold y Subscript t plus l minus j

The l-step-ahead prediction error of bold z Subscript t plus l is

StartLayout 1st Row  sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Lamda Subscript j Baseline left-parenthesis bold y Subscript t plus l minus j Baseline minus bold y Subscript t plus l minus j vertical-bar t Baseline right-parenthesis equals sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts left-parenthesis sigma-summation Underscript u equals 0 Overscript j Endscripts normal upper Lamda Subscript u Baseline normal upper Psi Subscript j minus u Baseline right-parenthesis bold-italic epsilon Subscript t plus l minus j EndLayout

Letting normal upper Sigma Subscript bold z Baseline left-parenthesis 0 right-parenthesis equals 0, the covariance matrix of the l-step-ahead prediction error of bold z Subscript t plus l, normal upper Sigma Subscript bold z Baseline left-parenthesis l right-parenthesis, is

StartLayout 1st Row 1st Column normal upper Sigma Subscript bold z Baseline left-parenthesis l right-parenthesis 2nd Column equals 3rd Column sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts left-parenthesis sigma-summation Underscript u equals 0 Overscript j Endscripts normal upper Lamda Subscript u Baseline normal upper Psi Subscript j minus u Baseline right-parenthesis normal upper Sigma Subscript epsilon Baseline left-parenthesis sigma-summation Underscript u equals 0 Overscript j Endscripts normal upper Lamda Subscript u Baseline normal upper Psi Subscript j minus u Baseline right-parenthesis prime 2nd Row 1st Column Blank 2nd Column equals 3rd Column normal upper Sigma Subscript bold z Baseline left-parenthesis l minus 1 right-parenthesis plus left-parenthesis sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Lamda Subscript j Baseline normal upper Psi Subscript l minus 1 minus j Baseline right-parenthesis normal upper Sigma Subscript epsilon Baseline left-parenthesis sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Lamda Subscript j Baseline normal upper Psi Subscript l minus 1 minus j Baseline right-parenthesis prime EndLayout

If there are stochastic exogenous (independent) variables, the covariance matrix of the l-step-ahead prediction error of bold z Subscript t plus l, normal upper Sigma Subscript bold z Baseline left-parenthesis l right-parenthesis, is

StartLayout 1st Row 1st Column normal upper Sigma Subscript bold z Baseline left-parenthesis l right-parenthesis 2nd Column equals 3rd Column normal upper Sigma Subscript bold z Baseline left-parenthesis l minus 1 right-parenthesis plus left-parenthesis sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Lamda Subscript j Baseline normal upper Psi Subscript l minus 1 minus j Baseline right-parenthesis normal upper Sigma Subscript epsilon Baseline left-parenthesis sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Lamda Subscript j Baseline normal upper Psi Subscript l minus 1 minus j Baseline right-parenthesis prime 2nd Row 1st Column Blank 2nd Column Blank 3rd Column plus left-parenthesis sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Lamda Subscript j Baseline upper V Subscript l minus 1 minus j Baseline right-parenthesis normal upper Sigma Subscript a Baseline left-parenthesis sigma-summation Underscript j equals 0 Overscript l minus 1 Endscripts normal upper Lamda Subscript j Baseline upper V Subscript l minus 1 minus j Baseline right-parenthesis prime EndLayout

Last updated: June 19, 2025