@ Green, Palmquist, and Schickler (1997). @ @ "Macropartisanship: A Replication and Critique" @ @ program to simulate the effects of autoregression bias @ @ in macropartisanship data @ @ Program performs i replications of AR(1) regressions @ @ assuming n observations @ @ Simulation is used to assess the consequences of autoregression @ @ on 29 observations in MacKuen et al. (1992) @ b=.95; y0=60; a=60-b*y0; errvar=0; @ simulates measurement error if > 0 @ n=29; let stackr[1,2]= . .; i=0; do while i < 100; last=n-1; e=1.80*rndn(n,1); y=recserar(ones(n,1)*a+e,y0,b); y=y+errvar*rndn(n,1); t=seqa(1,1,n); yt=y[2:last+1]; yt1=y[1:last]; bhat=yt/(ones(rows(yt1),1)~yt1); bhat=bhat[2,1]; stackr=stackr|(bhat~n); i=i+1; endo; stackr=trimr(stackr,1,0); sortc(stackr,1); print; print "mean, median, std"; meanc(stackr)'; median(stackr)' ; stdc(stackr[.,1])';