/* Spurious Regression Simulation */ /* Compare Regressions on Levels versus Differences */ /* Simulate Independent Random Walks */ /* Tom Fomby, Dept. of Economics, SMU, Dallas, TX 75275 */ /* References: Granger, C., and P. Newbold (1974), "Spurious Regressions in Econometrics," Journal of Econometrics, 2, 111-120. Phillips, P. (1986), "Understanding Spurious Regressions," Journal of Econometrics, 33, 311-340. */ data rw; seedy=123456; seedx=654321; do sample = 1 to 20; y =0; x =0; do time = 1 to 1000; y = y; x = x; y = 0.00 + y + rannor(seedy); x = 0.00 + x + rannor(seedx); dy = y - lag(y); dx = x - lag(x); if time > 500 then output; end; end; run; /* run regressions by sample */ proc reg data=rw; model y = x; model dy = dx; by sample; run;