Instructions:
The included files can be used to test for unit roots in short panels using the methods described in Karavias and Tzavalis 2017: “Generalized Fixed-T Panel Unit Root Tests”.
· Extract the zip file in a folder. Open matlab and set that folder as the root directory.
· Save the data in an excel file where every row contains a different panel unit. You should have N rows and T columns.
· Import the excel file in Matlab. Create only one matrix N by T and name it “data”. Then the matlab codes will take as input the transpose of this data matrix. Otherwise, one can simply store the data from the beginning in a T by N form and feed them to the functions below.
· There are 6 files with the following tests that you can do:
1. Model with intercepts and one known break point.
2. Model with intercepts and two known break points.
3. Model with intercepts, linear trends and one known break point.
4. Model with intercepts, linear trends and two known break point.
5. Model with intercepts, linear trends and one break point at an unknown date.
6. Model with intercepts, linear trends and two break points at unknown dates.
In all the above cases the structural change appears under both the null and the alternative hypothesis.
In cases 5 and 6 the break locations are estimated in a first step using Bai's (2010) method.
In detail:
1) [t]=kt17_intercept_oneknownbreak_H1(data',l,pmax)
The above function takes as input the transpose of matrix “data”, the date of the break and the maximum order of serial correlation. It returns the t statistic which then is to be compared to critical values from a standard normal at the desired level.
2) [t]=kt17_intercept_twoknownbreak_H1(data',l1,l2,pmax)
The above function takes as input the transpose of matrix “data”, the dates of the breaks and the maximum order of serial correlation. It returns the t statistic which then is to be compared to critical values from a standard normal at the desired level.
3) [t]=kt17_trend_oneknownbreak_H1(data',l,pmax)
The above function takes as input the transpose of matrix “data”, the date of the break and the maximum order of serial correlation. It returns the t statistic which then is to be compared to critical values from a standard normal at the desired level.
4) [t]=kt17_trend_twoknownbreak_H1(data,l1,l2,pmax)
The above function takes as input the transpose of matrix “data”, the dates of the breaks and the maximum order of serial correlation. It returns the t statistic which then is to be compared to critical values from a standard normal at the desired level.
5) [t,breakest]=kt17_trend_oneunknownbreak_H1(data,pmax)
The above function takes as input the transpose of matrix “data” and the maximum order of serial correlation. It returns the t statistic which then is to be compared to critical values from a standard normal at the desired level. It also returns the estimated date of the break.
6) [t,breakest1,breakest2]=kt17_trend_twounknownbreak_H1(data,pmax)
The above function takes as input the transpose of matrix “data” and the maximum order of serial correlation. It returns the t statistic which then is to be compared to critical values from a standard normal at the desired level. It also returns the estimated break dates.
The above programs seem to be free of error. Please feel free to download, modify, and use these programs. However, we (the authors) do not assume any responsibility for possibly remaining errors. Under no circumstances shall we be liable for any damages whatsoever arising out of the use of these programs or out of the inability to use these programs.