* * Example 17.7 from page 669 * Koyck distributed lag * cal 1970 open data table17-2.prn data(format=prn,org=columns) 1970:1 1999:1 linreg ppce / resids # constant ppdi ppce{1} disp "Median lag" -log(2)/log(%beta(3)) disp "Mean lag" %beta(3)/(1-%beta(3)) * * %RHO (the autocorrelation of the coefficients) is computed by LINREG. %NOBS is * the number of observations, and %STDERRS(i) is the estimated standard error of * the ith coefficient. These are combined to produce the Durbin h. The result * computed here is somewhat smaller than in the text, because the text uses 30 * observations, instead of the 29 actually used in the regression. * disp "Durbin h" %rho*sqrt(%nobs/(1-%nobs*%stderrs(3)**2)) * * BG test as an alternative to Durbin h. TR**2 from this auxiliary regression is * the test statistic. * linreg resids # constant ppdi ppce{1} resids{1} cdf(title="Breusch-Godfrey Test") chisqr %trsq 1