VARMAX Procedure

Example 42.1 Analysis of United States Economic Variables

(View the complete code for this example.)

Consider the following four-dimensional system of US economic variables. Quarterly data for the years 1954 to 1987 are used (Lütkepohl 1993, Table E.3.).

title 'Analysis of US Economic Variables';
data us_money;
   date=intnx( 'qtr', '01jan54'd, _n_-1 );
   format date yyq. ;
   input y1 y2 y3 y4 @@;
   y1=log(y1);
   y2=log(y2);
   label y1='log(real money stock M1)'
         y2='log(GNP in bil. of 1982 dollars)'
         y3='Discount rate on 91-day T-bills'
         y4='Yield on 20-year Treasury bonds';
datalines;
450.9 1406.8  0.010800000 0.026133333
453.0 1401.2 0.0081333333 0.025233333
459.1 1418.0 0.0087000000 0.024900000

   ... more lines ...   

The following statements plot the series:

proc sgplot data=us_money;
   series x=date y=y1 / lineattrs=(pattern=solid);
   series x=date y=y2 / lineattrs=(pattern=dash);
   yaxis label="Series";
run;

Output 42.1.1 shows the plot of the variables y Baseline 1 and y Baseline 2.

Output 42.1.1: Plot of Data

Plot of Data


The following statements plot the variables y Baseline 3 and y Baseline 4:

proc sgplot data=us_money;
   series x=date y=y3 / lineattrs=(pattern=solid);
   series x=date y=y4 / lineattrs=(pattern=dash);
   yaxis label="Series";
run;

Output 42.1.2 shows the plot of the variables y Baseline 3 and y Baseline 4.

Output 42.1.2: Plot of Data

Plot of Data


The following statements perform the Dickey-Fuller test for stationarity, the Johansen cointegrated test integrated order 2, and the exogeneity test. The VECM(2) is fit to the data.

proc varmax data=us_money;
   id date interval=qtr;
   model y1-y4 / p=2 lagmax=6 dftest
                 print=(iarr(3) estimates diagnose)
                 cointtest=(johansen=(iorder=2));
   cointeg rank=1 normalize=y1 exogeneity;
run;

From the outputs shown in Output 42.1.5, you can see that the series has unit roots and is cointegrated in rank 1 with integrated order 1. The fitted VECM(2) is given as

StartLayout 1st Row 1st Column normal upper Delta bold y Subscript t 2nd Column equals 3rd Column Start 4 By 1 Matrix 1st Row  0.0408 2nd Row  0.0860 3rd Row  0.0052 4th Row  negative 0.0144 EndMatrix plus Start 4 By 4 Matrix 1st Row 1st Column negative 0.0140 2nd Column 0.0065 3rd Column negative 0.2026 4th Column 0.1306 2nd Row 1st Column negative 0.0281 2nd Column 0.0131 3rd Column negative 0.4080 4th Column 0.2630 3rd Row 1st Column negative 0.0022 2nd Column 0.0010 3rd Column negative 0.0312 4th Column 0.0201 4th Row 1st Column 0.0051 2nd Column negative 0.0024 3rd Column 0.0741 4th Column negative 0.0477 EndMatrix bold y Subscript t minus 1 2nd Row 1st Column Blank 2nd Column Blank 3rd Column plus Start 4 By 4 Matrix 1st Row 1st Column 0.3460 2nd Column 0.0913 3rd Column negative 0.3535 4th Column negative 0.9690 2nd Row 1st Column 0.0994 2nd Column 0.0379 3rd Column 0.2390 4th Column 0.2866 3rd Row 1st Column 0.1812 2nd Column 0.0786 3rd Column 0.0223 4th Column 0.4051 4th Row 1st Column 0.0322 2nd Column 0.0496 3rd Column negative 0.0329 4th Column 0.1857 EndMatrix normal upper Delta bold y Subscript t minus 1 plus bold-italic epsilon Subscript t EndLayout

The normal upper Delta prefixed to a variable name implies differencing.

Output 42.1.3 through Output 42.1.16 show the details. Output 42.1.3 shows the descriptive statistics.

Output 42.1.3: Descriptive Statistics

Analysis of US Economic Variables

The VARMAX Procedure

Number of Observations136
Number of Pairwise Missing0

Simple Summary Statistics
VariableTypeNMeanStandard
Deviation
MinMaxLabel
y1Dependent1366.212950.079246.102786.45331log(real money stock M1)
y2Dependent1367.778900.301107.245088.27461log(GNP in bil. of 1982 dollars)
y3Dependent1360.056080.031090.008130.15087Discount rate on 91-day T-bills
y4Dependent1360.064580.029270.024900.13600Yield on 20-year Treasury bonds


Output 42.1.4 shows the output for Dickey-Fuller tests for the nonstationarity of each series. The null hypothesis is that there exists a unit root. All series have a unit root.

Output 42.1.4: Unit Root Tests

Unit Root Test
VariableTypeRhoPr < RhoTauPr < Tau
y1Zero Mean0.050.69341.140.9343
 Single Mean-2.970.6572-0.760.8260
 Trend-5.910.7454-1.340.8725
y2Zero Mean0.130.71245.140.9999
 Single Mean-0.430.9309-0.790.8176
 Trend-9.210.4787-2.160.5063
y3Zero Mean-1.280.4255-0.690.4182
 Single Mean-8.860.1700-2.270.1842
 Trend-18.970.0742-2.860.1803
y4Zero Mean0.400.78030.450.8100
 Single Mean-2.790.6790-1.290.6328
 Trend-12.120.2923-2.330.4170


The Johansen cointegration rank test shows whether the series is integrated order either 1 or 2 as shown in Output 42.1.5. The last two columns in Output 42.1.5 explain the cointegration rank test with integrated order 1. The results indicate that there is a cointegrated relationship with cointegration rank 1 with respect to the 0.05 significance level because the test statistic for the null hypothesis H0: r equals 0 is 55.9633 and its corresponding p-value is 0.0072, less than 0.05 (indicating that H0: r equals 0 should be rejected), and the test statistic for the null hypothesis H0: r equals 1 is 20.6542 and its corresponding p-value is 0.3775, greater than 0.05 (indicating that H0: r equals 1 cannot be rejected). Now, look at the row associated with r equals 1. All p-values of the tests for the null hypothesis that the series are integrated order 2 are zeros, less than 0.05 significance level (indicating that the null hypothesis should be rejected).

Output 42.1.5: Cointegration Rank Test

Cointegration Rank Test for I(2)
r\k-r-s4321Trace
of I(1)
Pr > Trace
of I(1)
0384.6090214.3790107.937837.025255.96330.0072
Pr > Trace of I(2)0.00000.00000.00000.0000  
1 219.623989.215127.326120.65420.3775
Pr > Trace of I(2) 0.00000.00000.0000  
2  73.617822.13282.64770.9803
Pr > Trace of I(2)  0.00000.0000  
3   38.29430.01490.9031
Pr > Trace of I(2)   0.0000  


Output 42.1.6 shows the estimates of the long-run parameter, bold-italic beta, and the adjustment coefficient, bold-italic alpha.

Output 42.1.6: Cointegration Rank Test, Continued

Beta
Variable1234
y11.000001.000001.000001.00000
y2-0.46458-0.63174-0.69996-0.16140
y314.51619-1.298641.37007-0.61806
y4-9.355207.536722.479011.43731

Alpha
Variable1234
y1-0.013960.01396-0.011190.00008
y2-0.02811-0.02739-0.000320.00076
y3-0.00215-0.04967-0.00183-0.00072
y40.00510-0.02514-0.002200.00016


Output 42.1.7 shows the estimates bold-italic eta and bold-italic xi.

Output 42.1.7: Cointegration Rank Test, Continued

Eta
Variable1234
y152.7490741.74502-20.8040355.77415
y2-49.10609-9.4008198.8719922.56416
y368.29674-144.83173-27.3595315.51142
y4121.25932271.8049685.85156-130.11599

Xi
Variable1234
y1-0.00842-0.00052-0.00208-0.00250
y20.001410.00213-0.00736-0.00058
y3-0.004450.00541-0.001500.00310
y4-0.00211-0.00064-0.001300.00197


Output 42.1.8 shows that the VECM(2) is fit to the data. The RANK=1 option in the COINTEG statement produces the estimates of the long-run parameter, bold-italic beta, and the adjustment coefficient, bold-italic alpha.

Output 42.1.8: Parameter Estimates

Analysis of US Economic Variables

The VARMAX Procedure

Type of ModelVECM(2)
Estimation MethodMaximum Likelihood Estimation
Cointegrated Rank1

Beta
Variable1
y11.00000
y2-0.46458
y314.51619
y4-9.35520

Alpha
Variable1
y1-0.01396
y2-0.02811
y3-0.00215
y40.00510


Output 42.1.9 shows the parameter estimates in terms of the constant, the lag 1 coefficients (bold y Subscript t minus 1) that are contained in the alpha beta prime estimates, and the coefficients that are associated with the lag 1 first differences (normal upper Delta bold y Subscript t minus 1).

Output 42.1.9: Parameter Estimates, Continued

Constant
VariableConstant
y10.04076
y20.08595
y30.00518
y4-0.01438

Parameter Alpha * Beta' Estimates
Variabley1y2y3y4
y1-0.013960.00648-0.202630.13059
y2-0.028110.01306-0.407990.26294
y3-0.002150.00100-0.031210.02011
y40.00510-0.002370.07407-0.04774

AR Coefficients of Differenced Lag
DIF LagVariabley1y2y3y4
1y10.346030.09131-0.35351-0.96895
 y20.099360.037910.239000.28661
 y30.181180.078590.022340.40508
 y40.032220.04961-0.032920.18568


Output 42.1.10 through Output 42.1.12 show the parameter estimates and their significance.

Output 42.1.10: Parameter Estimates, Continued

Model Parameter Estimates
EquationParameterEstimateStandard
Error
t ValuePr > |t|Variable
D_y1CONST10.040760.014182.870.00481
 AR1_1_1-0.013960.00495-2.820.0056y1(t-1)
 AR1_1_20.006480.002302.820.0056y2(t-1)
 AR1_1_3-0.202630.07191-2.820.0056y3(t-1)
 AR1_1_40.130590.046342.820.0056y4(t-1)
 AR2_1_10.346030.064145.39<.0001D_y1(t-1)
 AR2_1_20.091310.073341.250.2154D_y2(t-1)
 AR2_1_3-0.353510.11024-3.210.0017D_y3(t-1)
 AR2_1_4-0.968950.20737-4.67<.0001D_y4(t-1)
D_y2CONST20.085950.016795.12<.00011
 AR1_2_1-0.028110.00586-4.79<.0001y1(t-1)
 AR1_2_20.013060.002724.79<.0001y2(t-1)
 AR1_2_3-0.407990.08514-4.79<.0001y3(t-1)
 AR1_2_40.262940.054874.79<.0001y4(t-1)
 AR2_2_10.099360.075941.310.1932D_y1(t-1)
 AR2_2_20.037910.086830.440.6632D_y2(t-1)
 AR2_2_30.239000.130521.830.0695D_y3(t-1)
 AR2_2_40.286610.245521.170.2453D_y4(t-1)
D_y3CONST30.005180.016080.320.74761
 AR1_3_1-0.002150.00562-0.380.7024y1(t-1)
 AR1_3_20.001000.002610.380.7024y2(t-1)
 AR1_3_3-0.031210.08151-0.380.7024y3(t-1)
 AR1_3_40.020110.052530.380.7024y4(t-1)
 AR2_3_10.181180.072712.490.0140D_y1(t-1)
 AR2_3_20.078590.083130.950.3463D_y2(t-1)
 AR2_3_30.022340.124960.180.8584D_y3(t-1)
 AR2_3_40.405080.235061.720.0873D_y4(t-1)
D_y4CONST4-0.014380.00803-1.790.07581
 AR1_4_10.005100.002811.820.0713y1(t-1)
 AR1_4_2-0.002370.00130-1.820.0713y2(t-1)
 AR1_4_30.074070.040721.820.0713y3(t-1)
 AR1_4_4-0.047740.02624-1.820.0713y4(t-1)
 AR2_4_10.032220.036320.890.3768D_y1(t-1)
 AR2_4_20.049610.041531.190.2345D_y2(t-1)
 AR2_4_3-0.032920.06243-0.530.5990D_y3(t-1)
 AR2_4_40.185680.117441.580.1164D_y4(t-1)


Output 42.1.11: Parameter Estimates, Continued

Alpha and Beta Parameter Estimates
EquationParameterEstimateStandard
Error
t ValuePr > |t|Variable
D_y1ALPHA1_1-0.013960.00495-2.820.0056Beta[,1]'*_DEP_(t-1)
 BETA1_11.00000   y1(t-1)
D_y2ALPHA2_1-0.028110.00586-4.79<.0001Beta[,1]'*_DEP_(t-1)
 BETA2_1-0.46458   y2(t-1)
D_y3ALPHA3_1-0.002150.00562-0.380.7024Beta[,1]'*_DEP_(t-1)
 BETA3_114.51619   y3(t-1)
D_y4ALPHA4_10.005100.002811.820.0713Beta[,1]'*_DEP_(t-1)
 BETA4_1-9.35520   y4(t-1)


Output 42.1.12: Parameter Estimates, Continued

Covariance Parameter Estimates
ParameterEstimateStandard
Error
t ValuePr > |t|
COV1_10.000050.000018.19<.0001
COV1_20.000010.000012.780.0062
COV2_20.000070.000018.19<.0001
COV1_3-0.000010.00001-1.600.1118
COV2_30.000020.000012.710.0077
COV3_30.000070.000018.19<.0001
COV1_4-0.000000.00000-1.310.1936
COV2_40.000010.000003.290.0013
COV3_40.000020.000006.67<.0001
COV4_40.000020.000008.19<.0001


Output 42.1.13 shows the innovation covariance matrix estimates, the log-likelihood, the various information criteria results, and the tests for white noise residuals. According to the portmanteau test results, the residuals have significant correlations at lag 2 and 3, indicating that a VECM(3) model might be a better fit than the VECM(2) model.

Output 42.1.13: Diagnostic Checks

Covariances of Innovations
Variabley1y2y3y4
y10.000050.00001-0.00001-0.00000
y20.000010.000070.000020.00001
y3-0.000010.000020.000070.00002
y4-0.000000.000010.000020.00002

Log-likelihood2479.23

Information Criteria
AICC-4859
HQC-4844.07
AIC-4886.46
SBC-4782.14
FPEC2.23E-18

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

Portmanteau Test for Cross Correlations
of Residuals
Up To LagDFChi-SquarePr > ChiSq
31653.90<.0001
43274.03<.0001
548103.08<.0001
664116.94<.0001


Output 42.1.14 describes how well each univariate equation fits the data. The residuals for y Baseline 3 and y Baseline 4 differ from normality. Except for the residuals for y Baseline 3, there are no AR effects on other residuals. Except for the residuals for y Baseline 4, there are no ARCH effects on other residuals.

Output 42.1.14: Diagnostic Checks, Continued

Univariate Model ANOVA Diagnostics
VariableR-SquareStandard
Deviation
F ValuePr > F
y10.67540.0071232.51<.0001
y20.30700.008436.92<.0001
y30.13280.008072.390.0196
y40.08310.004031.420.1963

Univariate Model White Noise Diagnostics
VariableDurbin
Watson
NormalityARCH
Chi-SquarePr > ChiSqF ValuePr > F
y12.134187.190.02751.620.2053
y22.040031.200.54831.230.2697
y31.86892253.76<.00011.780.1847
y41.98440105.21<.000121.01<.0001

Univariate Model AR Diagnostics
VariableAR1AR2AR3AR4
F ValuePr > FF ValuePr > FF ValuePr > FF ValuePr > F
y10.680.41262.980.05422.010.11542.480.0473
y20.050.81850.120.88420.410.74530.300.8762
y30.560.45472.860.06104.830.00323.710.0069
y40.010.93400.160.85591.210.31030.950.4358


The PRINT=(IARR) option provides the VAR(2) representation in Output 42.1.15.

Output 42.1.15: Infinite Order AR Representation

Infinite Order AR Representation
LagVariabley1y2y3y4
1y11.332080.09780-0.55614-0.83836
 y20.071251.05096-0.168990.54955
 y30.179030.079590.991130.42520
 y40.037320.047240.041161.13795
2y1-0.34603-0.091310.353510.96895
 y2-0.09936-0.03791-0.23900-0.28661
 y3-0.18118-0.07859-0.02234-0.40508
 y4-0.03222-0.049610.03292-0.18568
3y10.000000.000000.000000.00000
 y20.000000.000000.000000.00000
 y30.000000.000000.000000.00000
 y40.000000.000000.000000.00000


Output 42.1.16 shows whether each variable is the weak exogeneity of other variables. The variable y Baseline 1 is not the weak exogeneity of other variables, y Baseline 2, y Baseline 3, and y Baseline 4; the variable y Baseline 2 is not the weak exogeneity of other variables, y Baseline 1, y Baseline 3, and y Baseline 4; the variables y Baseline 3 and y Baseline 4 are the weak exogeneity of other variables.

Output 42.1.16: Weak Exogeneity Test

Testing Weak Exogeneity of
Each Variable
VariableDFChi-SquarePr > ChiSq
y116.550.0105
y2112.540.0004
y310.090.7695
y411.810.1786


Last updated: June 19, 2025