Announcement

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

  • Negative margins for positive dependent variable (xtnbreg, fe)

    Dear all,

    I have problems interpreting the margins that I obtained when running margins for a fixed-effects negative binomial regression on panel data (xtnbreg, fe).

    The predicted marings take negative values and are statistically significant but my dependent variable really has only positive outcomes (ranging 0-2000, not only integers). I don't know how to interpret these predictions since the margins command calculates predicted outcomes in the dependent variable's true measurement unit.

    The constant I obtained from the regression is also negative (-3), but I think that is alright since the intercept is not a free parameter, but a normalizing constant that ensures the probabilities add up to one. The predicted margins should, however, be true values which for my dependent variable can only be positive.

    I am very grateful for any help
    Isabella

  • #2
    The reason why the predictions given by margins are negative is that in this case these predictions are not in the original measurement unit. The margins looks at the default prediction for an estimation command to determine what it predicts after an estimation command. You can look at help xtnbret postestimation, go to the part of that helpfile on prediction and see what that default is. In general for an estimation command foo you would look at the help foo postestimation helpfile to find this information. In case of xtnbreg the default prediction is the linear predictor, which can be negative. You can change what margins predicts by changing the predict() option.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Thank you very much for your reply, Maarten!

      It seems to me, however, that xb is the only predict option that is working with xtnbreg, fe. If you think I missed something there I'd be grateful for your advice again.

      Comment


      • #4
        Welcome to Statalist, Isabelle!

        In your statement, that
        xb is the only predict option that is working with xtnbreg, fe
        I take it that you mean the only predict option that works with margins. That is incorrect. e.g.

        Code:
        use http://www.stata-press.com/data/r13/airacc, clear
        xtnbreg i_cnt i.inprog, exposure(pmiles) irr fe
        margins inprog, predict(nu0)
        
        Adjusted predictions                              Number of obs   =         80
        Model VCE    : OIM
        
        Expression   : Predicted number of events (assuming u_i=0), predict(nu0)
        
        ------------------------------------------------------------------------------
                     |            Delta-method
                     |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
              inprog |
                  0  |   101.0583   101.7455     0.99   0.321    -98.35932    300.4759
                  1  |   91.58576   92.54303     0.99   0.322    -89.79525    272.9668
        ------------------------------------------------------------------------------
        Steve Samuels
        Statistical Consulting
        [email protected]

        Stata 14.2

        Comment

        Working...
        X