? P&R Exercise 16.5 option limwarn=0; freq q; smpl 60:1 95:4; read(file='\tsp\prhb\datadisk\ex165.xls', format=excel) gcq gydq; trend time; dgcq=gcq-gcq(-1); dgydq=gydq-gydq(-1); title 'D-F test for consumption'; unit(nows, maxlag=2, minlag=2) gcq; ? Do the same thing manually. olsq dgcq c time gcq(-1) dgcq(-1) dgcq(-2); cdf(dickeyf) @t(3); title 'D-F test for first-differenced consumption'; unit(nows, maxlag=2, minlag=2) dgcq; title 'D-F test for income'; unit(nows, maxlag=2, minlag=2) gydq; title 'D-F test for first-differenced income'; unit(nows, maxlag=2, minlag=2) dgydq; title 'Cointegration test for consumption and income'; ? Note that the Johansen test and the Engle-Granger test ? both accept cointegration, contrary to the conclusion in ? P&R, which is based on the Durbin-Watson with no ? augmenting lags. coint(nounit, joh, maxlag=2, minlag=2, notrend) gcq gydq; ? Do the same thing manually. olsq gcq c gydq; res=@res; dres=res-res(-1); olsq res c res(-1) dres(-1) dres(-2); set alpha=@coef(2); set tauDF=(alpha-1)/@ses(2); cdf(dickeyf) tauDF; ? Now do the test in P&R (no augmenting lags). olsq res c res(-1); set alpha=@coef(2); set tauDF=(alpha-1)/@ses(2); cdf(dickeyf) tauDF; stop;end;