Page 1 of 1

Table of unit root tests

Posted: Thu Mar 03, 2011 4:42 pm
by unforgiven02
I have a large database which has above 100 variables and I want to test the stationarity of these series using LM unit root test with structural break. For doing that, I must use the same code, run and obtain the results.
Is there a simple way to use this code? My data file has variables in coloumns and is in .dat format. Using "do - end do" statement, can i use the code continually and write the LM test statistics and t statistics of dummy variables into an excel file?

Re: about lee and strazicich code

Posted: Fri Mar 04, 2011 12:02 pm
by TomDoan
It's probably easiest to do that by building a REPORT. The LSUNIT procedure (and most similar testing procedures) define as %CDSTAT the test statistic. This inserts the series label and the test statistic in the first two columns of a new line for each series. When you're done, you can just export it to an XLS or other type of file.

Code: Select all

cal(m) 1973:1
open data exdata.rat
data(format=rats) 1973:1 1989:10 pc6it pzunew exritl
*
source lsunit.src
report(action=define)
dofor s = pc6it pzunew exritl
   @lsunit(noprint) s
   report(row=new,atcol=1) %l(s) %cdstat
end dofor s
report(action=show,unit=copy,format=xls)
close copy