* R. Carter Hill, William E. Griffiths and Guay C. Lim, * Principles of Econometrics, Third Edition, Wiley, 2008. * Chapter 9.5 Autoregressive Models * Chapter 9.6 Finite Distributed Lags * Chapter 9.7 Autoregressive Distributed Lag Models SAMPLE 1 269 * The variable INFLN is undefined for the first observation. * Use the SKIPLINES option to skip the first observation. READ (inflation.shd) YEAR MONTH WAGE PCWAGE CPI INFLN / skiplines=1 STAT WAGE PCWAGE CPI INFLN * Least squares estimation of an AR(3) model for the inflation rate. * Equation (9.37), page 245. * The chapter DISTRIBUTED-LAG MODELS in the SHAZAM Users' Reference Manual * describes how to introduce lagged variables with the special form: * indep(first.last) OLS INFLN INFLN(1.3) * Estimation method II - the AUTO command AUTO INFLN / ORDER=3 * Estimation method III - the ARIMA command ARIMA INFLN / NAR=3 COEF=BETA GEN1 S=SQRT($SIG2) * Forecasting for three periods ahead. * The results can be compared with Table 9.2, page 247. * Numerical differences are due to different estimation approaches. ARIMA INFLN / NAR=3 COEF=BETA SIGMA=S FBEG=269 FEND=272 * Chapter 9.6 Finite Distributed Lags * Equation estimation Table 9.3, page 249. OLS INFLN PCWAGE(0.3) * The SHAZAM output reports TESTS ON LAGGED COEFFICIENTS * The long-run or total multiplier is SUM(COEFS). * Now create lagged variables and re-estimate the model GENR PCWAGE1=LAG(PCWAGE) GENR PCWAGE2=LAG(PCWAGE,2) GENR PCWAGE3=LAG(PCWAGE,3) * Adjust the sample period SAMPLE 4 269 OLS INFLN PCWAGE PCWAGE1-PCWAGE3 * Get the interim multipliers reported in Table 9.4, page 249. TEST PCWAGE+PCWAGE1 TEST PCWAGE+PCWAGE1+PCWAGE2 * The total multiplier TEST PCWAGE+PCWAGE1+PCWAGE2+PCWAGE3 * Chapter 9.7 Autoregressive Distributed Lag Models * Equation estimation Equation (9.47), page 251. SAMPLE 1 269 GENR INFLN1=LAG(INFLN) GENR INFLN2=LAG(INFLN,2) SAMPLE 4 269 * On the OLS command use the COEF= option to save the * estimated coefficients in the variable B. OLS INFLN PCWAGE PCWAGE1-PCWAGE3 INFLN1 INFLN2 / COEF=B * Calculate the lag weights (bottom of page 251). * The calculation method is give in Equation (9C.6), page 266. * The commands show the use of the GENR command with the LAG function * for recursive calculations. SET NOWARN GENR BWT=0 SAMPLE 1 1 GENR BWT = B:1 SAMPLE 2 2 GENR BWT = B:5*LAG(BWT) + B:2 SAMPLE 3 3 GENR BWT = B:5*LAG(BWT) + B:6*LAG(BWT,2) + B:3 SAMPLE 4 4 GENR BWT = B:5*LAG(BWT) + B:6*LAG(BWT,2) + B:4 SAMPLE 5 13 GENR BWT = B:5*LAG(BWT) + B:6*LAG(BWT,2) SAMPLE 1 13 GENR LAG=TIME(-1) FORMAT(F12.0,F12.4) PRINT LAG BWT / FORMAT * Calculate the total impact as the sum of the lag weights * (middle of page 252). STAT BWT / SUMS=TOTAL PRINT TOTAL STOP