* R. Carter Hill, William E. Griffiths and Guay C. Lim, * Principles of Econometrics, Fourth Edition, Wiley, 2011. * Chapter 9.2 Finite Distributed Lags READ (okun.dat) / names GEN1 nobs=$N * Generate change in employment GENR du = u - LAG(u) * Generate lagged variables DO #=1,3 GENR g#=LAG(g,#) ENDO * Estimation results Table 9.2, page 346. * Adjust the sample period for undefined observations * Lag length 3 SAMPLE 4 nobs OLS du g g1 g2 g3 * Lag length 2 SAMPLE 3 nobs OLS du g g1 g2 * Chapter 9.3 Serial Correlation SAMPLE 1 nobs * Use the ARIMA command to calculate the sample autocorrelation function, * results in Equation (9.16), page 349 and Figure 9.6, page 350. ARIMA g / GRAPHAC NLAG=12 ACF=r * Calculate the test statistics at bottom of page 349. SAMPLE 1 4 GENR z=SQRT(nobs)*r DISTRIB z / TYPE=NORMAL MEAN=0 VAR=1 CDF=cdf * Get a p-value for a two-sided test. GENR pvalue=2*(1-cdf) PRINT r z pvalue STOP