smpl 1 100 genr e=nrnd coef(20) phiest for !1=1 to 20 genr phi=1-!1/10 smpl 1 1 genr y!1=0 smpl 2 100 genr y!1=phi*y!1(-1)+e ls y!1 c ar(1) genr phiest(!1)=@coef(2) next coef(20) thetaest for !1=1 to 20 genr theta=1-!1/10 smpl 1 1 genr x!1=0 smpl 2 100 genr x!1=theta*e(-1)+e ls x!1 c ma(1) genr thetaest(!1)=@coef(2) next coef(100) arcoef coef(100) macoef for !1=1 to 10 genr theta=1-!1/5 for !2=1 to 10 genr phi=1-!2/5 smpl 1 1 genr n=!1*!2 genr z=0 smpl 2 100 genr z=theta*x!1(-1)+phi*e(-1)+e ls zn c ar(1) ma(1) genr arcoef(n)=@coef(2) genr macoef(n)=@coef(3) next next