* * Example 12.3 from pages 251-252 * open data tablef5-1[1].txt calendar(q) 1950 data(format=prn,org=columns) 1950:1 2000:4 year qtr realgdp realcons realinvs realgovt realdpi $ cpi_u m1 tbilrate unemp pop infl realint * * Create inflation as 400*the difference of the logs of the CPI. Multiplying by * 400 converts to percentages on an annual basis. (100 for decimal to percent, 4 * for quarterly to annual). * set infl = 400.0*(log(cpi_u)-log(cpi_u{1})) set delinfl = infl-infl{1} * * Regress the difference in inflation on unemployment * linreg delinfl / resids # constant unemp * * Compute - the ratio of the coefficients, and the delta-method standard errors. * summarize(title="Estimate of the NAIRU") -%beta(1)/%beta(2) disp "Confidence Interval" %sumlc+%invnormal(.025)*sqrt(%varlc) "to" %sumlc+%invnormal(.975)*sqrt(%varlc) * * Graph residuals as an example of negative autocorrelation * graph(footer="Figure 12.3 Negatively Autocorrelated Residuals") # resids * * Run a one lag autoregression. Note the fairly large negative coefficient on the * lag of resids. * linreg resids # constant resids{1}