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
QUESTIONS
- 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)- ?
- Does it matter whether I use an offset variable or not? Will the answer to question #1 be the same regardless?
Comment