Theory and Practice of Testing for a Single Structural Break in Stata
Total Page:16
File Type:pdf, Size:1020Kb
A Service of Leibniz-Informationszentrum econstor Wirtschaft Leibniz Information Centre Make Your Publications Visible. zbw for Economics Majune, Socrates Kraido Preprint Theory and Practice of Testing for a Single Structural Break in Stata Suggested Citation: Majune, Socrates Kraido (2018) : Theory and Practice of Testing for a Single Structural Break in Stata, ZBW - Deutsche Zentralbibliothek für Wirtschaftswissenschaften, Leibniz-Informationszentrum Wirtschaft, Kiel und Hamburg This Version is available at: http://hdl.handle.net/10419/172517 Standard-Nutzungsbedingungen: Terms of use: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Documents in EconStor may be saved and copied for your Zwecken und zum Privatgebrauch gespeichert und kopiert werden. personal and scholarly purposes. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle You are not to copy documents for public or commercial Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich purposes, to exhibit the documents publicly, to make them machen, vertreiben oder anderweitig nutzen. publicly available on the internet, or to distribute or otherwise use the documents in public. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, If the documents have been made available under an Open gelten abweichend von diesen Nutzungsbedingungen die in der dort Content Licence (especially Creative Commons Licences), you genannten Lizenz gewährten Nutzungsrechte. may exercise further usage rights as specified in the indicated licence. www.econstor.eu Theory and Practice of Testing for a Single Structural Break in Stata Socrates Kraido Majune* January, 2018 Abstract The major objective of this paper is to demonstrate, theoretically and empirically, the test of a single structural break/change. Failure to address a structural break can lead to forecasting errors and the general unreliability of a model. Three approaches of testing for structural change are discussed using data from Johnston et al. (1997, p.130) on Stata 14 software. The first approach assesses whether there is a structural break in parameters (slope and intercept) while the second and third assess whether there is a break in slope and intercept respectively. The Residual Sum of Squares (RSS) for the restricted and unrestricted models are established to necessitate the use of an F-test in making inferences. According to the first approach, a structural break exists at 5% level of significance. This result is confirmed by the Chow test. The second and third approaches establish that the structural break is from the intercept and not the slope. These results are also affirmed by the Chow test. Furthermore, all these results, from the first to the third approach, are confirmed by an alternative approach which relies on the knowledge that t 2 F . Therefore, the dependent variable is not affected by the policy change on the explanatory variable but it is mainly affected by the basic unobserved qualitative characteristics of the two sub-periods. For further analysis, it is recommended that a unit root test be conducted using the Zivot-Andrews test. This test has been established as the panacea for the interplay between unit root and structural changes. JEL Classification: C01; C52; C80; C87 Key words: Structural Break, Chow Test, Unit Root, Zivot-Andrews Test * Department of Economics, University of Dar es Salaam, Tanzania. E-mail: [email protected] 1.0 Introduction A Structural Change/Break is a change or a shift in the common operations of an economy. It might be caused by inter alia, external forces such as the world financial crisis of 2008-2009, policy changes such as capping of interest rates to four percent above Central Bank’s lending rates in Kenya in 2016, and economic crises. Hence, the main interest of Structural Breaks is that the values of the parameters of the model do not remain constant through the entire time period (Gujarati & Porter, 2009). Hence, it is important to check for Structural Changes especially in time-series data. This paper focuses on a single structural break caused by a policy change. As a result, three different approaches of testing for this Structural Break are discussed. Thereafter, alternative approaches of testing for the Structural Break are discussed. These discussions involve theoretical and practical illustrations based on Johnston & DiNardo (1998, pp. 126-133) and Stata 14 software is used. This paper is organized as follows. After this brief introduction in section 1, the nature of data used is discussed in section 2. Thereafter, approaches of structural breaks are extensively discussed in theory and empirics in section 3. Section 4 is on alternative approaches while section 5 is the conclusion. 2.0 Data This section discusses how data is uploaded in Stata 14 and how other variables are generated. A link to the data, and the Do-File are provided in the appendix. Original data from Johnston & DiNardo (1998, p. 130) is of the form: 1 2 3 4 3 6 1 2 5 8 2 4 6 10 푦 = 2 푥 = 6 푦 = 푥 = 1 1 2 6 2 12 4 10 7 14 [6] [13] 9 16 9 18 [11] [20] 1 To enter this data from the Keyboard, the input command is used followed by x and y2 as follows3: input x y. Afterwards, a time variable is created using the command gen time=_n. Time helps to partition data as it will be seen shortly. Thereafter, two dummies are generated based on time where dummy1 has period 1 to 5 as having structural break (d1=1) while the period after 5 does not have structural break (d1=0). Equally, dummy 2 has period 1 to 5 having no structural break (d2=0) while the period after 5 has structural break (d2=1). The subsequent commands are: gen d1=1 and replace d1=0 if time >=6 for dummy 1 and; gen d2=1 and replace d2=0 if time<=5 for dummy 2. The slope depicting the break is generated by the command gen Z1=x followed by replace Z1=0 if time>=6. Similarly, the slope for the post-break period is generated by the command gen Z2=x followed by replace Z2=0 if time<=5. The final data is presented in Table 14. Table 1: Data x y time d1 d2 Z1 Z2 2 1 1 After the Break Before the Break 2 0 4 2 2 After the Break Before the Break 4 0 6 2 3 After the Break Before the Break 6 0 10 4 4 After the Break Before the Break 10 0 13 6 5 After the Break Before the Break 13 0 2 1 6 Before the Break After the Break 0 2 4 3 7 Before the Break After the Break 0 4 6 3 8 Before the Break After the Break 0 6 8 5 9 Before the Break After the Break 0 8 10 6 10 Before the Break After the Break 0 10 12 6 11 Before the Break After the Break 0 12 14 7 12 Before the Break After the Break 0 14 16 9 13 Before the Break After the Break 0 16 18 9 14 Before the Break After the Break 0 18 20 11 15 Before the Break After the Break 0 20 2 This is regardless of whether the variable is 푥1 or 푥2 and 푦1 or 푦2. 3 The usually steps of preparing Stata for data were done e.g. set more off and labeling data. See Do-File for details. 4 Also see Figure 1 in the appendix. 2 Note: After the Break=1 while Before the Break=0. A command, logout, save(list) word replace fix: list, uploads results directly into word. 3.0 Analysis of Structural Breaks This section discusses three approaches used to determine the presence of a structural break and its source. Each approach involves establishment of Residual Sum of Squares (RSS) from a restricted and an unrestricted model which are encompassed in an F-statistic5. The restricted model assumes that the sub-period regressions are not different and that the intercept and the slope remain the same for the entire period (Gujarati & Porter, 2009). Conversely, the unrestricted model assumes that the intercept and the slope coefficients are different for the sub-periods (Gujarati & Porter, 2009). Thereafter, inference is made by comparing the F-statistic with the F-critical value. Each approach is discussed below alongside their respective Chow test which is an alternative approach. 3.1 The Common Approach (Tests of slope and intercept) The break is assumed to arise from both the intercept and the slope (all parameters) in this case. Given that the break is only for two periods, period 1 (pre) and period 2 (post) which occurs after the break, we let 푦푖, 푥푖 (푖 = 1,2) to indicate the appropriate partitioning of the data. Similarly, we let 푛 = 푛1 + 푛2, where 푛1 and 푛2 are the number of observations for period 1 and period 2 respectively. Therefore, the resulting restricted model is of the form: 풚 풊 풙∗ 풑풓풆 풑풓풆 풑풓풆 휶 ퟐ [풚 ] = [ ∗ ] [ ∗] + 풖 풖~푵(ퟎ, 흈 푰)...…………………………………………. 1 풑풐풔풕 풊풑풐풔풕 풙풑풐풔풕 휷 The subsequent unrestricted model is of the form: 휶ퟏ 풚 풊 ퟎ 풙∗ 휶 풑풓풆 풑풓풆 풑풓풆 ퟎ ퟐ ퟐ [ ] = [ ∗ ] [ ∗ ] + 풖 풖~푵(ퟎ, 흈 푰) ………………...……………… 2 풚풑풐풔풕 ퟎ 풊풑풐풔풕 ퟎ 풙풑풐풔풕 휷ퟏ ∗ 휷ퟐ The restricted model in (1) assumes that the intercept as well as the slope coefficient remain the ∗ ∗ ∗ same over the entire period in that 훂 = 휶ퟏ = 휶ퟐ and 훃 = 휷ퟏ = 휷ퟐ. Its degrees of freedom are 풏ퟏ + 풏ퟐ − 풌 or 풏 − 풌 where 풌 is the number of parameters being estimated. 5 (푹푺푺푹−푹푺푺푼푹)/풅풇∗ 푭 = ~푭(풅풇∗, 풅풇) 푹푺푺푼푹/풅풇 3 The unrestricted model in (2) assumes that the intercept and the slope coefficients are different.