Announcement

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

  • Fixing the Negative Binomial Standard errors in XTREG command

    Hi everyone,
    I'm running these negative binomial fixed effects regressions, but as you know it does not allow for clustering over the id. It might be a naive approach and that's why Stata does not allow for it.Instead what do you recommend for fixing the standard errors. I have a panel of 8984 individuals over 15 years.
    Thanks.

  • #2
    Mona:
    do you mean -xtnbreg- command?
    Anyway, it is difficult to advise without looking at the results you're writing about.
    Hence, I would recommend you to post them, along with what you typed, via code delimiters (just click the # button among the advanced editor [A icon top right]options). Thanks.
    Kind regards,
    Carlo
    (Stata 15.1 SE)

    Comment


    • #3
      Yes I meant xtnbreg.
      Here is the code I initially use :
      Code:
      xtnbreg daysmarij shiftworks  i.ethnicity age i.region hhsize i.education married healthy urban lwage, fe
      and here is the code for clustering which doesn't work and says : option fe() not allowed

      Code:
      xtnbreg daysmarij shiftworks  i.ethnicity age i.region hhsize i.education married healthy urban lwage, fe (cluster PUBID)
      And the initial fixed effect results :
      Here is my initial results for the main independent variable :
      Last edited by Mona Sameni; 07 Mar 2015, 12:43.

      Comment


      • #4
        Hello Mona,

        Now that Carlo helped out to clarify the exact command chosen by you, I wish to add a few comments.

        According to the manual (http://www.stata.com/manuals13/xtxtnbreg.pdf), standard errors after xtnbreg (RE/FE models) can be: oim, bootstrap or jackknife.

        Below you have the output for the three types of vce:

        Code:
        . use http://www.stata-press.com/data/r13/airacc
        
        . xtset airline
               panel variable:  airline (balanced)
        
        . . xtnbreg i_cnt inprog, fe vce(oim)
        
        Iteration 0:   log likelihood =  -188.7575  
        Iteration 1:   log likelihood = -188.66739  
        Iteration 2:   log likelihood = -188.66681  
        Iteration 3:   log likelihood = -188.66681  
        
        Conditional FE negative binomial regression     Number of obs      =        80
        Group variable: airline                         Number of groups   =        20
        
                                                        Obs per group: min =         4
                                                                       avg =       4.0
                                                                       max =         4
        
                                                        Wald chi2(1)       =      0.37
        Log likelihood  = -188.66681                    Prob > chi2        =    0.5446
        
        ------------------------------------------------------------------------------
               i_cnt |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
              inprog |  -.0533318    .088025    -0.61   0.545    -.2258575     .119194
               _cons |   3.042697   .3556139     8.56   0.000     2.345706    3.739687
        ------------------------------------------------------------------------------
        
        . . xtnbreg i_cnt inprog, fe vce(boot)
        (running xtnbreg on estimation sample)
        
        Bootstrap replications (50)
        ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
        ..................................................    50
        
        Conditional FE negative binomial regression     Number of obs      =        80
        Group variable: airline                         Number of groups   =        20
        
                                                        Obs per group: min =         4
                                                                       avg =       4.0
                                                                       max =         4
        
                                                        Wald chi2(1)       =      0.52
        Log likelihood  = -188.66681                    Prob > chi2        =    0.4695
        
                                        (Replications based on 20 clusters in airline)
        ------------------------------------------------------------------------------
                     |   Observed   Bootstrap                         Normal-based
               i_cnt |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
              inprog |  -.0533318     .07374    -0.72   0.470    -.1978595     .091196
               _cons |   3.042697   .2829999    10.75   0.000     2.488027    3.597366
        ------------------------------------------------------------------------------
        
        . . xtnbreg i_cnt inprog, fe vce(jack)
        (running xtnbreg on estimation sample)
        
        Jackknife replications (20)
        ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
        ....................
        
        Conditional FE negative binomial regression     Number of obs      =        80
        Group variable: airline                         Number of groups   =        20
        
                                                        Obs per group: min =         4
                                                                       avg =       4.0
                                                                       max =         4
        
                                                        F(     1,      19) =      0.44
        Log likelihood  = -188.66681                    Prob > F           =    0.5174
        
                                        (Replications based on 20 clusters in airline)
        ------------------------------------------------------------------------------
                     |              Jackknife
               i_cnt |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
              inprog |  -.0533318   .0808409    -0.66   0.517    -.2225338    .1158703
               _cons |   3.042697    .298351    10.20   0.000     2.418241    3.667152
        ------------------------------------------------------------------------------
        Hopefully it helps.

        Best,

        Marcos
        Last edited by Marcos Almeida; 07 Mar 2015, 13:21.
        Best regards,

        Marcos

        Comment


        • #5
          Thanks Marcos, but the option vce(oim) apparently does nothing to my fixed effects estimations standard errors becuase the results remain the same and the bootstrap and jacknife options take forever.That's because there are too many replications to be made in my longitudinal dataset.

          Comment


          • #6
            Mona:
            after Marcos' solution proposal, I am not clear in with respect do you expect your standard errors (SEs) to change under the -oim- (or whatever else) option.
            I'm under the impression that you should weight the trade-off between default (and possibly biased) defaulst SEs and more computationally intensive (and possibly more trustworthy) -bootstrap- and -jackknife- SEs.
            Kind regards,
            Carlo
            (Stata 15.1 SE)

            Comment


            • #7
              Hi Mona,

              Maybe I should have overtly underlined that - oim - is the default.

              On account of that, the lack (or presence) of the notation wouldn't change your previous results at all. You'll be still in the realms of the very same vce option. That's why you found that oim "apparently did nothing".

              I only inserted it for didactic purposes and to make it clear that we were comparing the observed information matrix (oim) with bothstrap and jackknife replications.

              That said, as already pointed out by Carlo, you may also think about "tailoring" the vce options.

              Best,

              Marcos
              Best regards,

              Marcos

              Comment

              Working...
              X