Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Search for commands for unit root test of time series data with multiple structural breaks

    Hello , all

    For data with multiple structural breaks, I am searching for a suitable test for the unit root, or test commands.

    thanks

  • #2
    In Stata, there are several commands that can be used for unit root testing of time series data with multiple structural breaks:

    1. xtbreak: This command is used for testing and estimating structural breaks in time series and panel data. It can detect the existence of breaks, determine their number and location, and provide break date confidence intervals. You can use -xtbreak test- for testing for known or unknown structural breaks and -xtbreak estimate- for estimating breakpoints.

    2. xtbunitroot: This command allows for one or two breaks at either known or unknown dates. It is the first Stata command which allows for panel unit root tests with structural breaks and can be viewed as a complement to the official -xtunitroot- command.

    Please note that these commands are community-contributed and not part of the official Stata suite. You may need to install them separately. Always refer to the official documentation for each command to understand its syntax and options.

    Comment


    • #3
      Dear, Dr. Mustafa
      Thank you for the kind reply 🙏 I really appreciate your help, I came that command . However I could not understand how to use it .
      Last edited by Bolis Olwak; 29 Apr 2024, 16:31.

      Comment


      • #4


        Hello ,Dr. Mustafa
        i have used the commends (xtbunitroot) to test for multiple break in my data as you advised, ,but it has asked me to specify the data as panel and am using time series data. However, I tried to use andrews test but it has picked one break point while the data has more then one break point Would that affect my analysis if I proceeded with test? ? i would appreciate it if you could illustrate more about the command or any alternative because i want through the book Economic Theory and Practice but i cannot find a clear direction. Below is my attempt to use the command; maybe i missed something.

        . xtbunitroot lkonyop
        varlist required
        r(100);

        . xtbunitroot lkonyop,lag(1)
        option lag() not allowed
        r(198);

        thanks

        Bolis

        Comment


        • #5
          Hi Bolis,
          I saw your email and decided to reply here. The error message “varlist required” typically means that the command is expecting a list of variables, but it did not find one.

          In your case explained in the email, lkonyo should be the variable you want to test (lkonyop in this post). However, the error suggests that lkonyo might not be recognized as a variable in your dataset. Please make sure that lkonyo is a valid variable in your dataset.

          Also, the xtunitroot command requires the data to be xtset before running the test. This means you need to declare your data to be panel data. Here is an example of how to use the xtunitroot command:

          Code:
          xtset panelvar timevar
          xtunitroot llc lkonyo, lags(4)
          In this example, panelvar is the variable that identifies the panel (i.e., the individual unit or cross-sectional dimension), and timevar is the time variable. llc specifies the Levin-Lin-Chu test, and lags(4) specifies 4 lags for the augmented Dickey–Fuller regressions.

          Please replace panelvar and timevar with your actual panel and time variables whatever they are in your dataset (maybe id t or firm year), and adjust the number of lags as necessary.

          If you’ve already done this and are still encountering issues, it might be helpful to turn on trace (set trace on) to see more details about what’s happening when you run the command. If the problem persists, please provide more information about your dataset and the exact steps you’re taking.

          Comment


          • #6
            Hi Prof.Mustafa

            I apologise for my initial confusion and thank you for the helpful information and explanation provided. I am using time series, not panel data and it looks like the command is panel data based on your explanation above that is why is not working with my data.
            I was looking for a unit root test of time series data with multiple structural breaks in stata, I found Zivot-Andrews test but it was for a single break.
            ​That is why I posted in a group to get help.
            do stata have a test which can test for time series unit roots with multiple structural breaks? If, is there, could help me with kindly. I was told that Lagrange multipliers LM can be used for unit root tests with structural breaks unfortunately I could not find the stata command for it.
            thank you once again for your response.

            best regards

            Bolis

            Comment

            Working...
            X