about lee and strazicich code

Discussion of models with structural breaks or endogenous switching.

about lee and strazicich code

Postby unforgiven02 » Thu Mar 03, 2011 5:42 pm

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?
unforgiven02
 
Posts: 10
Joined: Sat May 16, 2009 1:26 pm

Re: about lee and strazicich code

Postby TomDoan » Fri Mar 04, 2011 1:02 pm

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
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm


Return to Structural Breaks and Switching Models

Who is online

Users browsing this forum: No registered users and 1 guest