options memory=30 limwarn=0 crt ; supres smpl ; ? ? ========================= SIMHTHS =============================== ? ? One Variable Time Series Process Using Panel Data. ? Use simulated data to investigate testing methodology. ? Harris-Tzavalis Test for Unit Roots. ? DGP: heteroskedastic errors. ? ? Bronwyn H. Hall - Hall and Mairesse 2001 (for Munich). ? Revised Sept. 2001. ? ? Fixed Effect with Trend or Drift to match US Log R&D const nob 200 t 12 ndraw 1000 ; list stats ymean yvar phi htest reject ; smpl 1 ndraw ; dot stats ; ? Initialize simulation statistics. .= @miss ; enddot ; set nobt = nob*t ; set t1 = t-1 ; set b2 = -3/(t1+1) ; set c2 = 3*(17*t1*t1-20*t1+17)/(5*(t1-1)*(t1+1)*(t1+1)*(t1+1)) ; set c2s = sqrt(c2/nob) ; print nob t t1 b2 c2 c2s nob ; smpl 1 nobt ; random (seedin=29345) e ; ? Initialize seed. ? ? Set up id and trend. ? trend(pstart=1,period=t) trend ; select trend=1 ; trend id ; select trend>1 ; id = id(-1) ; select trend>0 ; dummy trend yrdum ; list dylist dy79-dy89 ; ? List of differenced series. date startime ; do imod = 1 to 8 ; ? Simulate all 8 models (see labels below). do isim = 1 to ndraw ; smpl 1 nobt ; input simhsprcs ; msd (silent) y ; set ymean(isim) = @mean(1) ; set yvar(isim) = @var(1) ; panel(silent,nobet,novar,id=id) y y(-1) yrdum ; set phi(isim) = @coefw(1)-b2 ; set test = (@coefw(1)-1-b2)/sqrt(c2/nob) ; set htest(isim) = test ; cdf (normal,lowtail) test crit ; set reject(isim) = crit<=.05 ; enddo ; smpl 1 ndraw ; dot stats ; unmake . . ; enddot ; msd stats ; enddo ;