我想通过SAS生成一个AR(1)残差序列图,程序请看附件,中间有许多矛盾的地方,请帮忙修改!
data userexample5;
x1=0.5;
n=-50;
do i=-50 to 1000;
e=rannor(123);
xt=0.4*x1+e;
x1=xt;
Rt=xt-0.4*x1;
x1=xt;
n=n+1;
if i>0 then output;
end;
run;
proc print data=userexample5;
var Rt;
proc gplot data=userexample5;
symbol i=spline c=blue;
plot Rt*n;
run;