Announcement

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

  • Question about xtserial and autocorrelation

    Dear Stata forum members,
    Thanks in advance for any helpfull response.
    I am running an nbreg model with panel data. I was advised to check for autocorrelation (since I have panel data). I used xtserial which gave me Pob. F>0.1
    That means that the null hypothesis of no first-order autocorrelation is not rejected. To me this sounds that I can't really be sure whether there is autocorrelation or not. I would be sure that there is, only if it were rejected, right?
    Any ideas as if/how to account for this potential problem? Would clustering standard errors be a potential solution?
    Thanks again.





  • #2
    One of the method is to use The Newey –West (1987) standard errors.
    Code:
    help newey
    The Huber/White/sandwich robust variance estimator (see White [1980]) produces consistent standard errors for OLS regression coefficient estimates in the presence of heteroskedasticity. The Newey –West (1987) variance estimator is an extension that produces consistent estimates when there is autocorrelation in addition to possible heteroskedasticity.
    Regards
    --------------------------------------------------
    Attaullah Shah, PhD.
    Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
    FinTechProfessor.com
    https://asdocx.com
    Check out my asdoc program, which sends outputs to MS Word.
    For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

    Comment


    • #3
      If your N is large and T is not, you should just use the cluster option. That allows any kind of serial correlation and heteroskasticity. The Newey-West approach uses a down weighting, which is neither necessary nor desirable. It looks like you have borderline serial correlation if p = .10.

      Comment


      • #4
        Dear Attaulah , I am running a Negative Binomial regression, not OLS. I thought this was clear from the nbreg. Apologies for not pointing it out.

        Dear Jeff, Yes, in one model p from xtserial is 0.11 but in another model it is 0.054.
        I do use the vce(cluster) option. Does this mean that this is a remedy to autocorrelation? Sorry but I am new in regression.

        Comment


        • #5
          xtserial only works when the model is linear. So you should basically ignore that. If you are using pooled nbreg you should definitely cluster, as serial correlation is almost certainly present. Clustering allows for any kind of serial correlation provided T is not too large. You didn't answer the question about N and T, however.

          Comment


          • #6
            Dear Jeff,
            Many thanks for your response. N=270 and T=15 years.
            I have seen papers where they use Negative Binomial and they check for autocorrelation due to panel data. Is it safe to ignore?

            Comment


            • #7
              Dear Jeff, as a clarification I have 18 countries and 15 years of observations (15x18=270). I thought that N refers to the number of observations, but I see that some people also use it for the number of subjects. Thanks again.

              Comment


              • #8
                Anything you do with negbin is necessarily only justified using asymptotic (large sample) approximations. You don't really have 270 observations. From the perspective of either clustering or any kind of GLS modification of negbin, you have 18 observations. This is pushing it. My view is that you are better off using the pooled negbin procedure and clustering. Any other fix likely has worse finite sample properties.

                Comment


                • #9
                  Dear Jeff, thanks again for this.
                  Although I have panel data, I don't use the xtnbreg, but nbreg (this way I get the pooled estimator, right?). I do this due to the potential problem of xtnbreg with -fe option.
                  My configuration looks like this:
                  nbreg countvar x1 x2 x3....x8 i.year i.country, vce(cluster country)

                  However, just for the record, I tried to model it as Poisson (alpha is 10-8 magnitude) and results are identical (almost) both for
                  xtpoisson countvar x1 x2 x3....x8 i.year i.country, re vce(cluster country)
                  and
                  xtpoisson countvar x1 x2 x3....x8 i.year i.country, fe vce(robust)

                  If my understanding is correct, it is safe to consider that this configuration is fine from autocorrelation perspective.

                  Comment


                  • #10
                    Just FYI, you could consider using residual based serial correlation tests (e.g. -xtqptest- on ssc). I have no idea to which extent they are valid after nonlinear models though. You might be interested in this post, which deals with the difference between poisson and nbreg at the bottom: http://blog.stata.com/2011/08/22/use...tell-a-friend/

                    Comment


                    • #11
                      Dear professors,

                      Is it appropriate to use xtserial to the residuals of a Mean Group estimator (Pesaran and Shin 1995)? In other words, is it correct to use xtserial to the residuals of a regression obtained with xtmg? I tried to combine them and I got a result, but I want to know if it is appropriate to combine them.

                      Comment

                      Working...
                      X