Announcement

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

  • help on xtbunitroot command (Karavias and Tzavalis (2014)


    Hi,

    I am using xtbunitroot command - a non-official Stata command and community-contributed command by Chen et al (Chen, P., Karavias, Y., and Tzavalis, E., 2021. Panel Unit Root Tests with Structural Break).

    For my analysis, I used the xtbunitroot package. I have the following questions:

    1) This test does not tell whether the break date is significant or not. Is there any way to ascertain whether the break date is significant or not?

    2) How to avoid break date either in the beginning/endpoint of the sample? One way to avoid this problem is to trim the data. But I think xtbunitroot package does not allow for trimming the data. In my panel data, the break date is either coming in the beginning or in the end.

    3) Whether this test allows for testing the unit root at first difference? I used the following syntax to test whether the series is I(2):

    Code:
    xtbunitroot d.cpi, unknown(1 50) csd het
    I got the following error message:
    Code:
    factor-variable and time-series operators not allowed
    r(101);
    I would greatly appreciate it if anybody can kindly clarify them.


  • #2
    Hi Santosh,
    on your question 1 - 2, have you had a look at xtbreak? It estimates and tests for structural breaks. You find xtbreak on SSC or GitHub (https://janditzen.github.io/xtbreak/).

    About your 3rd question: xtbunitroot does not seem to support time series operators. My suggestion would be to generate a new variable dcpi = d.cpi and then use the newly generated variable.

    Hope this helps.

    Best,

    Jan
    Last edited by JanDitzen; 24 Jan 2022, 00:57.

    Comment


    • #3
      Dear Jan,

      Thank you for your reply. I have come across the nice xtbreak package. Sure, in the context of our study, I will have a look at it.
      Thank you for the suggestion to handle the #3 question.

      Comment


      • #4

        Hi,

        The community-contributed xtbunitroot command allows for -if- in the syntax.

        Code:
        Syntax
                xtbunitroot varname [if] [in] [,trend known(integer integer) unknown(numlist integer) normal csd het nobootstrap]

        However, when I applied the test for a subset of the panel, it is giving the following error. I am using Stata 17 version. I wrote the following syntax:

        Code:
        xtbunitroot cad if ic == "LIC", unknown(1 50) csd het
        Got the following error message:

        Code:
        panelsubmatrix():  3301  subscript invalid
                           ori():     -  function returned error
                         <istmt>:     -  function returned error
        r(3301);


        Tried a lot to fix it. Read some postings on the same on Statalist, but did not help. JanDitzen, I would appreciate it if you could offer any advice?

        Thank you. Looking forward to any help and suggestion.


        Comment


        • #5
          I am not the author of the program, so I cannot make any comments.

          What I would try is to keep only the data you want to use and run the analysis with this:

          Code:
          keep if ic == "LIC"
          xtbunitroot cad, unknown(1 50) csd het

          Comment


          • #6
            JanDitzen Thank you for the suggestion. Yes, I did the same.

            Comment

            Working...
            X