/* phillips_aus.def inf u Obs: 91, quarterly (1987Q1 - 2009Q3) inf : Australian Inflation Rate (Percentage Change in the Consumer Price Index with an adjustment for 2000Q3 when a national sales tax was introduced). u : Australian Unemployment Rate (Seasonally adjusted) The variable DU used in Chapter 9 is defined as U(t)-U(t-1). Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- inf | 91 .8043956 .6458263 -.4 2.6 u | 91 7.034066 1.818804 4 10.8 Data Source: Reserve Bank of Australia */ data phillips; input inf u; datalines; 2 8.1 1.5 8 1.7 7.8 1.8 7.7 1.8 7.3 1.7 7.3 1.9 6.7 2 6.5 1 6.3 2.5 6 2.3 5.8 1.8 5.6 1.7 6 1.6 6.2 0.8 7 2.6 7.6 -0.2 8.4 0.2 9.2 0.6 9.6 0.9 9.9 0 10.1 -0.3 10.5 0.1 10.6 0.5 10.8 0.9 10.7 0.4 10.6 0.5 10.6 0.2 10.5 0.4 10.1 0.7 9.7 0.6 9.2 0.8 8.8 1.7 8.5 1.3 8.2 1.2 8 0.8 8.2 0.4 8.2 0.7 8.1 0.3 8.3 0.2 8.3 0.2 8.4 -0.2 8.3 -0.4 8.2 0.3 8 0.3 7.9 0.6 7.7 0.2 7.8 0.5 7.4 -0.1 7.2 0.4 6.9 0.9 6.9 0.6 6.7 0.9 6.5 0.8 6.4 1 6.1 0.3 6.2 1.1 6.4 0.8 6.8 0.3 6.9 0.9 6.9 0.9 6.7 0.7 6.4 0.7 6.3 0.7 6.2 1.3 6.1 0 6.1 0.6 5.9 0.5 5.7 0.9 5.5 0.5 5.4 0.4 5.5 0.8 5.1 0.7 5.1 0.6 5.1 0.9 5 0.5 5.1 0.9 5 1.6 4.8 0.9 4.7 -0.1 4.6 0.1 4.5 1.2 4.3 0.7 4.3 0.9 4.4 1.3 4 1.5 4.2 1.2 4.2 -0.3 4.5 0.1 5.3 0.5 5.7 1 5.8 ; /* The Basic Phillips Curve we are going to be examining is of the form INF(t) = INF_expected(t) + gamma*(U(t) - U(t-1)) */ /* PART I Analysis: Assume INF_expections(t) = constant and modeled by intercept */ data phillips; set phillips; du = u - lag(u); time = _n_; run; symbol1 interpol=join value=dot; proc gplot data = phillips; plot u*time; plot du*time; plot inf*time; run; title 'OLS estimation of Phillips equation'; title2 'Durbin Watson statistic indicates autocorrelation in OLS errors'; /* DW = 0.887 with Pr abs(t) < 0.0001 indicating autocorrelation in the errors of regression */ proc reg data = results; model resid = resid_1 / noint; run; title 'LM test 1 for autocorrelation of errors'; /* t-statistic on resid_1 variable = 6.22. Autocorrelation is indicated. */ proc reg data = results; model inf = du resid_1; run; title 'LM test 2 for autocorrelation of errors'; /* t-statistic on resid_1 variable = 6.22. Numerically identical to the LN 1 test statistic. Autocorrelation is indicated. */ /* However, from this equation we can also conduct the t*R^2 = chi-square(1) test */ /* Therefore, the Tx(R^2) version of the LM test for autocorrelation is 89*0.3102 = 27.61 which is highly significant compared to the 5% critical value of the chi-square distribution with one degree of freedom = 3.841. */ proc reg data = results; model resid = du resid_1; run; title 'Estimation of Phillips equation with'; title2 'HAC standard errors for LS estimates'; title3 'Proc Model is used'; proc model data = phillips; endo inf; exog du; parms a0 b0; inf = a0 + b0*du; label a0 = 'intercept'; label b0 = 'Change in Unemployment coefficient'; fit inf / gmm kernel = (bart,4,0); run; title 'Estimation of the Phillips equation using AR(1) error'; /* Compared to the HAC t-statistic for the du variable, the AR(1) GLS estimate for the du coefficient is statistically more significant. */ proc autoreg data = phillips; model inf = du / nlag=1; run; data phillips; set phillips; inf_1 = lag(inf); du_1 = lag(du); run; title ' Estimation of the nonlinear version of the AR(1) Phillips equation'; proc reg data = phillips; model inf = inf_1 du du_1 / dwprob covb; run; /* Here we conduct the Delta Method test of the nonlinear restriction implied by the AR(1) error specification in the original Phillips equation. Implied restriction:= coef(inf_1)*coef(du) + coef(du_1) = 0 */ title 'Test Statistics for Common Factor Restriction Implied by AR(1) error specification'; title2 'Common Factor Restriction (theta1*thetha2 + theta3 = 0) is supported by the data'; title3 'See page 364 in Hill et al book'; proc iml; /* define necessary matrices for the delta method */ /* v = cov(inf_1 du du_1) obtained from "covb" in above proc reg statement */ v = {0.0082439583 -0.003703839 0.0067038944, -0.003703839 0.062435202 -0.04096177, 0.0067038944 -0.04096177 0.0663083159}; g = {-0.68819, 0.5927, 1}; varest = g`*v*g; seest = sqrt(varest); est = 0.55927*(-0.68819) + 0.31995; z = est/seest; chi_square = z**2; print est; print seest; print z; print chi_square; end; /* PART II Analysis: Assume INF_expections(t) = some autoregression in lagged values of INF */ /* We will now move to replicate the results in Table 9.4, p. 369 in Hill et. al. book */ data phillips; set phillips; inf_2 = lag2(inf); inf_3 = lag3(inf); inf_4 = lag4(inf); inf_5 = lag5(inf); inf_6 = lag6(inf); run; title 'Preferred ARDL(4,0) model displayed as equation (9.57), p. 368 in Hill et al'; title2 'This model implies INF(Expected) = constant + theta1*INF(t-1) + theta2*INF(t-2) + thetha3*INF(t-3) + thetha4*INF(t-4).'; proc reg data = phillips; model inf = inf_1 inf_2 inf_3 inf_4 du; *p = 1 q = 0; run; /* In order to compare various ARDL(p,q) models using the information criteria AIC and SBC we must force all competing models to use the same number of observations. Since in the below comparison we are using models that have a maximum of 6 lags in them and because there are a total of 91 observations available we standardize the data set by dropping the first six use the last 85 observations which have no missing values due to lags. */ data phillips_85; set phillips; if _n_ > 6; run; /* SAS defines AIC = nln(SSE/n) + 2p and SBC = nln(SSE/n) + pln(p). SSE = sum of squared errors, n = number of used observations, and p = the number of parameters in the model including the intercept. Hill et al. define AIC = SAS_AIC/n and SAS_SBC/n. So to get the results in Table 9.4, p. 369 in Hill et. al you will have to divide the SAS AIC and SBC numbers by n = 85 to get the numbers in Table 9.4. */ title 'Replicating the results in Table 9.4, p. 369 in Hill et al'; proc reg data = phillips_85 plots=diagnostics(stats=(default aic sbc)); model inf = inf_1 du; *p = 1 q = 0; model inf = inf_1 inf_2 du; *p = 2 q = 0; model inf = inf_1 inf_2 inf_3 du; *p = 3 q = 0; model inf = inf_1 inf_2 inf_3 inf_4 du; *p = 4 q = 0; model inf = inf_1 inf_2 inf_3 inf_4 inf_5 du; *p = 5 q = 0; model inf = inf_1 inf_2 inf_3 inf_4 inf_5 inf_6 du; *p = 6 q = 0; model inf = inf_1 du du_1; *p = 1 q = 1; model inf = inf_1 inf_2 du du_1; *p = 2 q = 1; model inf = inf_1 inf_2 inf_3 du u_1; *p = 3 q = 1; model inf = inf_1 inf_2 inf_3 inf_4 du du_1; *p = 4 q = 1; model inf = inf_1 inf_2 inf_3 inf_4 inf_5 du du_1; *p = 5 q = 1; model inf = inf_1 inf_2 inf_3 inf_4 inf_5 inf_6 du du_1; *p = 6 q = 1; run;