Announcement

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

  • Using -margins- after Poisson or NB regressions, getting incidence rate ratios (IRR)

    I've seen from a previous post that, to obtain incidence rate ratios (IRR) after estimating a Poisson or negative binomial (NB) regression, the command is simply -margins, predict(ir)- . But the manual (https://www.stata.com/manuals/rpoiss...estimation.pdf, under "Options for predict") says that using this option -predict(ir)- is "equivalent to specifying n when neither offset() nor exposure() was specified when the model was fit." However, I do specify an offset variable in my regression: nbreg flag i.age4##last i.year i.location, irr offset(totqty_o). As you can see, my NB regression does ask for "irr" and specifies an offset variable.


    QUESTIONS
    1. Just to confirm, how do I obtain incidence rate ratios (IRR) after a Poisson or NB regression in Stata using the -margins- command? Is it -margins, predict(ir)- ?
    2. Does it matter whether I use an offset variable or not? Will the answer to question #1 be the same regardless?




  • #2
    But the manual (https://www.stata.com/manuals/rpoiss...estimation.pdf, under "Options for predict") says that using this option -predict(ir)- is "equivalent to specifying n when neither offset() nor exposure() was specified when the model was fit."
    What that means is that if your model does not specify an offset or exposure, then predict(ir) is equivalent to predict(n). Since your model does specify an offset, this simply doesn't apply to you.

    That said, -margins- calculates incidence rates, not incidence rate ratios. Incidence rate ratios are shown directly in the regression output, or, in the presence of interaction terms, the more complicated ones can be calculated with -lincom, irr-.

    Comment

    Working...
    X