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?
Table of unit root tests
Re: about lee and strazicich code
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