/* Unbalanced (Spurious) Regression Simulation */
/* Inconsistency of Estimating 'Unbalanced' equations */
/* Estimate y = I(0) vs. x = I(1) when the true equation is
y = I(0) vs. dx = I(0) */
/* Tom Fomby, Dept. of Economics, SMU, Dallas, TX 75275 */
data rw;
seedy=111111;
seedx=222222;
do sample = 1 to 20;
x = 0;
do time = 1 to 600;
x = x;
x = 1.00 + x + rannor(seedx);
dx = x - lag(x);
y = 10.0 + 1*dx + rannor(seedy);
if time > 500 then output;
end;
end;
run;
/* run unbalanced and balanced regressions by sample */
proc reg data=rw;
model y = x;
model y = dx;
by sample;
run;