Announcement

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

  • How to do the unitroot test for the panel data with gaps?

    I want to use the "xtunitroot" to do the unitroot test for the panel data, but I find that the command can't handle the panel data with gaps.Do you have any other options? Thanks for your reply!

  • #2
    Take a look at page 8 in the pdf entry for xtunitroot. There are a couple of tests that allow unbalanced panels.

    https://www.stata.com/manuals/xtxtunitroot.pdf

    Comment


    • #3
      Originally posted by Justin Niakamal View Post
      Take a look at page 8 in the pdf entry for xtunitroot. There are a couple of tests that allow unbalanced panels.

      https://www.stata.com/manuals/xtxtunitroot.pdf
      Thanks a lot , but "unbalanced panels" and "panels with gaps" do not have the same meaning. I've read the pdf you're talking about before and that's why I know xtunitroot can't handle the panel data with gaps.

      Comment


      • #4
        xtunitroot fisher does not require strongly balanced data, and the individual series can have gaps.

        Code:
        webuse pennxrate, clear
        drop in 17/19
        drop in 84/86
        xtset id year, yearly
        
        
        xtunitroot fisher lnrxrate, dfuller lags(3) drift
        
        
         xtset id year, yearly
               panel variable:  id (unbalanced)
                time variable:  year, 1970 to 2003, but with gaps
                        delta:  1 year
        
        .
        .
        .  xtunitroot fisher lnrxrate, dfuller lags(3) drift
        
        Fisher-type unit-root test for lnrxrate
        Based on augmented Dickey-Fuller tests
        ---------------------------------------
        Ho: All panels contain unit roots           Number of panels       =    151
        Ha: At least one panel is stationary        Avg. number of periods =  33.96
        
        AR parameter: Panel-specific                Asymptotics: T -> Infinity
        Panel means:  Included
        Time trend:   Not included
        Drift term:   Included                      ADF regressions: 3 lags
        ------------------------------------------------------------------------------
                                          Statistic      p-value
        ------------------------------------------------------------------------------
         Inverse chi-squared(302)  P       917.0841       0.0000
         Inverse normal            Z       -18.8585       0.0000
         Inverse logit t(759)      L*      -19.5772       0.0000
         Modified inv. chi-squared Pm       25.0274       0.0000
        ------------------------------------------------------------------------------
         P statistic requires number of panels to be finite.
         Other statistics are suitable for finite or infinite number of panels.

        Comment


        • #5
          The Fisher test can accommodate gaps.

          Comment


          • #6
            Originally posted by Justin Niakamal View Post
            xtunitroot fisher does not require strongly balanced data, and the individual series can have gaps.

            Code:
            webuse pennxrate, clear
            drop in 17/19
            drop in 84/86
            xtset id year, yearly
            
            
            xtunitroot fisher lnrxrate, dfuller lags(3) drift
            
            
            xtset id year, yearly
            panel variable: id (unbalanced)
            time variable: year, 1970 to 2003, but with gaps
            delta: 1 year
            
            .
            .
            . xtunitroot fisher lnrxrate, dfuller lags(3) drift
            
            Fisher-type unit-root test for lnrxrate
            Based on augmented Dickey-Fuller tests
            ---------------------------------------
            Ho: All panels contain unit roots Number of panels = 151
            Ha: At least one panel is stationary Avg. number of periods = 33.96
            
            AR parameter: Panel-specific Asymptotics: T -> Infinity
            Panel means: Included
            Time trend: Not included
            Drift term: Included ADF regressions: 3 lags
            ------------------------------------------------------------------------------
            Statistic p-value
            ------------------------------------------------------------------------------
            Inverse chi-squared(302) P 917.0841 0.0000
            Inverse normal Z -18.8585 0.0000
            Inverse logit t(759) L* -19.5772 0.0000
            Modified inv. chi-squared Pm 25.0274 0.0000
            ------------------------------------------------------------------------------
            P statistic requires number of panels to be finite.
            Other statistics are suitable for finite or infinite number of panels.
            I guess I didn't read it carefully enough and focus on IPS.
            Thank you very much!

            Comment


            • #7
              Originally posted by Scott Merryman View Post
              The Fisher test can accommodate gaps.
              Thank you!

              Comment

              Working...
              X