LSUnit (LM unit root test with multiple breaks)
This implements a number of varieties of LM unit root tests allowing for 0, 1, 2 or even more structural breaks of one of two varieties, as described in Lee and Strazicich(2003), "Minimum LM Unit Root Test with Two Structural Breaks," Review of Economics and Statistics, vol 85, no. 4, pp 1082-1089. This differs slightly from Lee and Strazicich's Gauss code as the lag pruning regressions use a common estimation range (from maxlag+1 on) rather than the lag+1 samples used in the Gauss code. The method chosen here would make it simpler to change the pruning method to an alternative like minimum AIC.
I incorporated a number of suggestions made by Junsoo Lee regarding the output, which includes output of all the coefficients other than the auxiliary lags.
Note that this can take a very long time for two or more breaks if the data set is large (>500 observations). The calculation time goes up with T^(# of breaks+1), so with 1000 data points, you're looking at roughly 1000 times as long to do two breaks as one.
Tom Doan
Estima
Procedure file:
Example:
I incorporated a number of suggestions made by Junsoo Lee regarding the output, which includes output of all the coefficients other than the auxiliary lags.
Note that this can take a very long time for two or more breaks if the data set is large (>500 observations). The calculation time goes up with T^(# of breaks+1), so with 1000 data points, you're looking at roughly 1000 times as long to do two breaks as one.
Tom Doan
Estima
Procedure file:
Example:
- Code: Select all
source lsunit.src
data(format=free,unit=input,org=cols) 1 38 year x
1960 11508
1961 11369
1962 11930
1963 12636
1964 13194
1965 13264
1966 13875
1967 14193
1968 15172
1969 15712
1970 16316
1971 16872
1972 17563
1973 18489
1974 18606
1975 18741
1976 18728
1977 18480
1978 19303
1979 19682
1980 19968
1981 20271
1982 19464
1983 20127
1984 20712
1985 21438
1986 21719
1987 22443
1988 23040
1989 22995
1990 22226
1991 21921
1992 22367
1993 23176
1994 24144
1995 24818
1996 25077
1997 25608
set logx = log(x)
@lsunit(breaks=2,pi=.10,lags=5,method=gtos,model=crash) logx
@lsunit(breaks=2,pi=.10,lags=5,method=gtos,model=break) logx