The VARMAX Procedure

Example 42.2 Analysis of German Economic Variables

(View the complete code for this example.)

This example considers a three-dimensional VAR(2) model. The model contains the logarithms of a quarterly, seasonally adjusted West German fixed investment, disposable income, and consumption expenditures. The data used are in Lütkepohl (1993, Table E.1).

title 'Analysis of German Economic Variables';
data west;
   date = intnx( 'qtr', '01jan60'd, _n_-1 );
   format date yyq. ;
   input y1 y2 y3 @@;
   y1 = log(y1);
   y2 = log(y2);
   y3 = log(y3);
   label y1 = 'logarithm of investment'
         y2 = 'logarithm of income'
         y3 = 'logarithm of consumption';
datalines;
180  451  415 179  465  421 185  485  434 192  493  448
211  509  459 202  520  458 207  521  479 214  540  487

   ... more lines ...   

data use;
   set west;
   where  date < '01jan79'd;
   keep date y1 y2 y3;
run;
proc varmax data=use;
   id date interval=qtr;
   model y1-y3 / p=2 dify=(1)
                 print=(decompose(6) impulse=(stderr) estimates diagnose)
                 printform=both lagmax=3;
   causal group1=(y1) group2=(y2 y3);
   output lead=5;
run;

First, the differenced data are modeled as a VAR(2) with the following result:

The parameter estimates AR1_1_2, AR1_1_3, AR2_1_2, and AR2_1_3 are insignificant, and the VARX model is fitted in the next step.

The detailed output is shown in Output 42.2.1 through Output 42.2.8.

Output 42.2.1 shows the descriptive statistics.

Output 42.2.1: Descriptive Statistics

Analysis of German Economic Variables

The VARMAX Procedure

Number of Observations75
Number of Pairwise Missing0
Observation(s) eliminated by differencing1

Simple Summary Statistics
VariableTypeNMeanStandard
Deviation
MinMaxDifferenceLabel
y1Dependent750.018110.04680-0.140180.193581logarithm of investment
y2Dependent750.020710.01208-0.028880.050231logarithm of income
y3Dependent750.019870.01040-0.013000.044831logarithm of consumption


Output 42.2.2 shows that a VAR(2) model is fit to the data.

Output 42.2.2: Parameter Estimates

Analysis of German Economic Variables

The VARMAX Procedure

Type of ModelVAR(2)
Estimation MethodLeast Squares Estimation

Constant
VariableConstant
y1-0.01672
y20.01577
y30.01293

AR
LagVariabley1y2y3
1y1-0.319630.145990.96122
 y20.04393-0.152730.28850
 y3-0.002420.22481-0.26397
2y1-0.160550.114600.93439
 y20.050030.01917-0.01020
 y30.033880.35491-0.02223


Output 42.2.3 shows the parameter estimates and their significance.

Output 42.2.3: Parameter Estimates, Continued

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

Model Parameter Estimates
EquationParameterEstimateStandard
Error
t ValuePr > |t|Variable
y1CONST1-0.016720.01723-0.970.33521
 AR1_1_1-0.319630.12546-2.550.0132y1(t-1)
 AR1_1_20.145990.545670.270.7899y2(t-1)
 AR1_1_30.961220.664311.450.1526y3(t-1)
 AR2_1_1-0.160550.12491-1.290.2032y1(t-2)
 AR2_1_20.114600.534570.210.8309y2(t-2)
 AR2_1_30.934390.665101.400.1647y3(t-2)
y2CONST20.015770.004373.600.00061
 AR1_2_10.043930.031861.380.1726y1(t-1)
 AR1_2_2-0.152730.13857-1.100.2744y2(t-1)
 AR1_2_30.288500.168701.710.0919y3(t-1)
 AR2_2_10.050030.031721.580.1195y1(t-2)
 AR2_2_20.019170.135750.140.8882y2(t-2)
 AR2_2_3-0.010200.16890-0.060.9520y3(t-2)
y3CONST30.012930.003533.670.00051
 AR1_3_1-0.002420.02568-0.090.9251y1(t-1)
 AR1_3_20.224810.111682.010.0482y2(t-1)
 AR1_3_3-0.263970.13596-1.940.0565y3(t-1)
 AR2_3_10.033880.025561.330.1896y1(t-2)
 AR2_3_20.354910.109413.240.0019y2(t-2)
 AR2_3_3-0.022230.13612-0.160.8708y3(t-2)


Output 42.2.4 shows the innovation covariance matrix estimates, the various information criteria results, and the tests for white noise residuals. The residuals are uncorrelated except at lag 3 for variable.

Output 42.2.4: Diagnostic Checks

Covariances of Innovations
Variabley1y2y3
y10.002130.000070.00012
y20.000070.000140.00006
y30.000120.000060.00009

Information Criteria
AICC-1527.51
HQC-1536.46
AIC-1561.11
SBC-1499.27
FPEC2.18E-11

Cross Correlations of Residuals
LagVariabley1y2y3
0y11.000000.132420.28275
 y20.132421.000000.55526
 y30.282750.555261.00000
1y10.01461-0.00666-0.02394
 y2-0.01125-0.00167-0.04515
 y3-0.00993-0.06780-0.09593
2y10.07253-0.00226-0.01621
 y2-0.08096-0.01066-0.02047
 y3-0.02660-0.01392-0.02263
3y10.099150.044840.05243
 y2-0.002890.140590.25984
 y3-0.033640.053740.05644

Schematic Representation
of Cross Correlations
of Residuals
Variable/Lag0123
y1+.+.........
y2.++........+
y3+++.........
+ is > 2*std error,  - is < -2*std error,  . is between

Portmanteau Test for Cross Correlations
of Residuals
Up To LagDFChi-SquarePr > ChiSq
399.690.3766


Output 42.2.5 describes how well each univariate equation fits the data. The residuals are off from the normality, but have no AR effects. The residuals for variable have the ARCH effect.

Output 42.2.5: Diagnostic Checks Continued

Univariate Model ANOVA Diagnostics
VariableR-SquareStandard
Deviation
F ValuePr > F
y10.12860.046151.620.1547
y20.11420.011721.420.2210
y30.25130.009443.690.0032

Univariate Model White Noise Diagnostics
VariableDurbin
Watson
NormalityARCH
Chi-SquarePr > ChiSqF ValuePr > F
y11.9626910.220.006012.390.0008
y21.9814511.980.00250.380.5386
y32.1458334.25<.00010.100.7480

Univariate Model AR Diagnostics
VariableAR1AR2AR3AR4
F ValuePr > FF ValuePr > FF ValuePr > FF ValuePr > F
y10.010.90290.190.82910.390.76241.390.2481
y20.000.98830.000.99610.460.70970.340.8486
y30.680.41290.380.68610.300.82450.210.9320


Output 42.2.6 is the output in a matrix format associated with the PRINT=(IMPULSE=) option for the impulse response function and standard errors. The variable in the first row is an impulse variable. The variable in the first column is a response variable. The numbers, 0.96122, 0.41555, –0.40789 at lag 1 to 3 are decreasing.

Output 42.2.6: Impulse Response Function

Simple Impulse Response by Variable
Variable
Response\Impulse
Lagy1y2y3
y11-0.319630.145990.96122
 STD0.125460.545670.66431
 2-0.054300.261740.41555
 STD0.129190.547280.66311
 30.119040.35283-0.40789
 STD0.083620.384890.47867
y210.04393-0.152730.28850
 STD0.031860.138570.16870
 20.028580.11377-0.08820
 STD0.031840.134250.16250
 3-0.008840.071470.11977
 STD0.015830.079140.09462
y31-0.002420.22481-0.26397
 STD0.025680.111680.13596
 20.045170.260880.10998
 STD0.025630.108200.13101
 3-0.00055-0.098180.09096
 STD0.016460.078230.10280


The proportions of decomposition of the prediction error covariances of three variables are given in Output 42.2.7. If you see the variable in the first column, then the output explains that about 64.713% of the one-step-ahead prediction error covariances of the variable is accounted for by its own innovations, about 7.995% is accounted for by innovations, and about 27.292% is accounted for by innovations.

Output 42.2.7: Proportions of Prediction Error Covariance Decomposition

Proportions of Prediction Error Covariances by Variable
VariableLeady1y2y3
y111.000000.000000.00000
 20.959960.017510.02253
 30.945650.028020.02633
 40.940790.029360.02985
 50.938460.030180.03136
 60.938310.030250.03145
y210.017540.982460.00000
 20.060250.907470.03228
 30.069590.895760.03465
 40.068310.892320.03937
 50.068500.892120.03938
 60.069240.891410.03935
y310.079950.272920.64713
 20.077250.273850.64890
 30.129730.333640.53663
 40.128700.334990.53631
 50.128590.339240.53217
 60.128520.339630.53185


The table in Output 42.2.8 gives forecasts and their prediction error covariances.

Output 42.2.8: Forecasts

Forecasts
VariableObsTimeForecastStandard
Error
95% Confidence Limits
y1771979:16.540270.046156.449826.63072
 781979:26.551050.058256.436886.66522
 791979:36.572170.068836.437256.70708
 801979:46.584520.080216.427326.74173
 811980:16.601930.091176.423246.78063
y2771979:17.684730.011727.661767.70770
 781979:27.705080.016917.671937.73822
 791979:37.722060.021567.679807.76431
 801979:47.742660.026157.691407.79392
 811980:17.762400.030057.703507.82130
y3771979:17.540240.009447.521727.55875
 781979:27.554890.012827.529777.58001
 791979:37.574720.018087.539287.61015
 801979:47.593440.022057.550227.63666
 811980:17.612320.025787.561797.66286


Output 42.2.9 shows that you cannot reject Granger noncausality from to using the 0.05 significance level.

Output 42.2.9: Granger Causality Tests

Granger-Causality Wald Test
TestDFChi-SquarePr > ChiSq
146.370.1734

Test 1: Group 1 Variables:y1
Group 2 Variables:y2 y3


The following SAS statements show that the variable is the exogenous variable and fit the VARX(2,1) model to the data:

proc varmax data=use;
   id date interval=qtr;
   model y2 y3 = y1 / p=2 dify=(1) difx=(1) xlag=1 lagmax=3
                      print=(estimates diagnose);
run;

The fitted VARX(2,1) model is written as

The detailed output is shown in Output 42.2.10 through Output 42.2.13.

Output 42.2.10 shows the parameter estimates in terms of the constant, the current and the lag one coefficients of the exogenous variable, and the lag two coefficients of the dependent variables.

Output 42.2.10: Parameter Estimates

Analysis of German Economic Variables

The VARMAX Procedure

Type of ModelVARX(2,1)
Estimation MethodLeast Squares Estimation

Constant
VariableConstant
y20.01542
y30.01319

XLag
LagVariabley1
0y20.02520
 y30.05130
1y20.03870
 y30.00363

AR
LagVariabley2y3
1y2-0.122580.25811
 y30.24367-0.31809
2y20.016510.03498
 y30.34921-0.01664


Output 42.2.11 shows the parameter estimates and their significance.

Output 42.2.11: Parameter Estimates, Continued

Model Parameter Estimates
EquationParameterEstimateStandard
Error
t ValuePr > |t|Variable
y2CONST10.015420.004433.480.00091
 XL0_1_10.025200.031300.810.4237y1(t)
 XL1_1_10.038700.032521.190.2383y1(t-1)
 AR1_1_1-0.122580.13903-0.880.3811y2(t-1)
 AR1_1_20.258110.173701.490.1421y3(t-1)
 AR2_1_10.016510.137660.120.9049y2(t-2)
 AR2_1_20.034980.167830.210.8356y3(t-2)
y3CONST20.013190.003463.810.00031
 XL0_2_10.051300.024412.100.0394y1(t)
 XL1_2_10.003630.025360.140.8868y1(t-1)
 AR1_2_10.243670.108422.250.0280y2(t-1)
 AR1_2_2-0.318090.13546-2.350.0219y3(t-1)
 AR2_2_10.349210.107363.250.0018y2(t-2)
 AR2_2_2-0.016640.13088-0.130.8992y3(t-2)


Output 42.2.12 shows the innovation covariance matrix estimates, the various information criteria results, and the tests for white noise residuals. The residuals is uncorrelated except at lag 3 for variable.

Output 42.2.12: Diagnostic Checks

Covariances of Innovations
Variabley2y3
y20.000140.00006
y30.000060.00009

Information Criteria
AICC-1182.33
HQC-1177.94
AIC-1193.46
SBC-1154.52
FPEC9.91E-9

Cross Correlations of Residuals
LagVariabley2y3
0y21.000000.56462
 y30.564621.00000
1y2-0.02312-0.05927
 y3-0.07056-0.09145
2y2-0.02849-0.05262
 y3-0.05804-0.08567
3y20.160710.29588
 y30.108820.13002

Schematic Representation
of Cross Correlations
of Residuals
Variable/Lag0123
y2++.....+
y3++......
+ is > 2*std error,  - is < -2*std error,  . is between

Portmanteau Test for Cross Correlations
of Residuals
Up To LagDFChi-SquarePr > ChiSq
348.380.0787


Output 42.2.13 describes how well each univariate equation fits the data. The residuals are off from the normality, but have no ARCH and AR effects.

Output 42.2.13: Diagnostic Checks Continued

Univariate Model ANOVA Diagnostics
VariableR-SquareStandard
Deviation
F ValuePr > F
y20.08970.011881.080.3809
y30.27960.009264.270.0011

Univariate Model White Noise Diagnostics
VariableDurbin
Watson
NormalityARCH
Chi-SquarePr > ChiSqF ValuePr > F
y22.0241314.540.00070.490.4842
y32.1341432.27<.00010.080.7782

Univariate Model AR Diagnostics
VariableAR1AR2AR3AR4
F ValuePr > FF ValuePr > FF ValuePr > FF ValuePr > F
y20.040.84480.040.95700.620.60290.420.7914
y30.620.43430.620.53830.720.54520.360.8379


Last updated: November 05, 2018