' 1-generate an MA(1) yt=et+beta*et-1 ' 2-estimate beta by ls ' 3-calculate the t-stat of b ' 4-1000 replications ' 5-get the distribution of the t-stat in "tstat" create u 1 1000 scalar beta=0.1 vector(1000) t=0 for !i=1 to 1000 series e=nrnd smpl @first @first series y=e smpl @first+1 @last series y=e+beta*e(-1) equation eq1.ls y ma(1) t(!i)=eq1.@tstats(1) next smpl @first @last mtos(t,tstat)