Announcement

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

  • Autocorrelation control for nbreg

    Hello,

    I am using a negative binomial model for my time series count data, but I haven't been able to find a way to correct for autocorrelation with this model. Does anyone know of a post estimation command for autocorrelation with a negative binomial regression?

    Thank you,
    Emily Rollins

  • #2
    If you are estimating a static model, or even a distributed lag model (lagged exogenous variables), then you might be better off using the Newey-West standard errors. Having said that, I don't think Stata allows that option for nbreg, but maybe others know.

    Modeling the serial correlation is much more challenging.

    Comment


    • #3
      While NW errors aren't allow for -nbreg- itself, you can run identical models using -glm- with family(nbinom) and vce(hac nwest).
      __________________________________________________ __
      Assistant Professor, Department of Biostatistics and Epidemiology
      School of Public Health and Health Sciences
      University of Massachusetts- Amherst

      Comment


      • #4
        Thanks, Andrew. I should've remembered this, as I use glm often (although I didn't know it had an nbinom option). Along these lines, since the Poisson estimator is fully robust, I would try that, too, with Newey-West standard errors.

        Comment


        • #5
          Hi Jeff, yes it's always funny and/or surprising what options are implemented under the stand-alone models vs -glm-. Makes for fun explorations!
          __________________________________________________ __
          Assistant Professor, Department of Biostatistics and Epidemiology
          School of Public Health and Health Sciences
          University of Massachusetts- Amherst

          Comment


          • #6
            Originally posted by Andrew Lover View Post
            While NW errors aren't allow for -nbreg- itself, you can run identical models using -glm- with family(nbinom) and vce(hac nwest).
            Hi Andrew,

            Can this solution work also with panel data?

            My code is:

            glm y x i.group i.year, family(poisson) vce(hac nwest 3 ) t(year)

            And I get the error message:

            repeated time values in sample.

            I think that it is the same problem that happens when you try to run -newey- on panel data. But in this case, I cannot solve the problem using the force option.

            Thanks!

            Comment

            Working...
            X