@ program to simulate the range of a unit root series over the period 1945-1996 @ n=208; @ number of quarter that elapse @ y0=60; @ starting level of macropid @ a=0; b=1; @ autoregressive coefficient @ sig=1.82; @ standard error of estimate @ t=seqa(1,1,n); repls=0; let stackr[1,2] = . . ; do while repls < 5000; u=sqrt(1.82)*rndn(n,1); y = recserar(a+u,y0,b); big=maxc(y); sml=minc(y); stackr=stackr|(big~sml); repls=repls+1; endo; stackr=trimr(stackr,1,0); e = (stackr[.,1] .gt 80) .or (stackr[.,2] .lt 20); let v = 1 0; out8020 = code(e,v); e = (stackr[.,1] .lt 70) .and (stackr[.,2] .gt 49); let v = 1 0; out7049 = code(e,v); print "percentage of " repls " replications in which y went outside {20%,80%} bounds:"; print meanc(out8020); print; print "percentage of " repls " replications in which y stayed inside {49%,70%} bounds:"; print meanc(out7049);