options memory=12 limwarn=0 crt ; ? ? ========================= HTEST =============================== ? ? One Variable Time Series Process for Sales, R&D, Investment, ? Employmemt, and Profits. ? Harris and Tzavalis test for unit roots. ? HM paper August 2000. ? ?in "/us/bchm/bchm" ; in "d:\france\bchm\bchm" ; ?in "\japan\bchm" ; ? ? Set up the data to be used - the series is called y. ? supres smpl ; const t 12 ; smpl 1 5088 ; ?select scisect ; set nob = @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 t1 b2 c2 c2s nob ; dummy year yrdum ; dot s r i l y; ? Loop over 5 variables - unit root tests will be computed for each. msd log. ; panel(nobet,novar,id=id) log. log.(-1) yrdum ; set phi. = @coefw(1) ; set htest. = (@coefw(1)-1-b2)/sqrt(c2/nob) ; enddot ; dot s r i l y ; print phi. ; cdf (normal,lowtail) htest. ; enddot ; stop ; end ;