Announcement

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

  • plotting interaction for xtpoisson

    Hi Statalist fellow,
    I have run an analysis but I don't trust my result. I would be extremely appreciated if you could help in this matter by checking my method.
    I run an xtpoisson model with interaction term and I need to plot the interactions.

    xtpoisson count a##b, fe vce(robust) irr

    margins a#b
    marginsplot, ytitle('IRR of count)



    The issue is that there is no consistency between the xtpoisson IRR coefficients and the result of margins.
    xtpoisson report:

    IRR =1.38 (p=0.001) for a
    IRR = 1.80 (p=0.001) for b
    IRR =0.85 (p=0.001) for a#b

    margins report:
    Linear prediction, predict()
    a#b
    0 0 0.49
    0 1 1.092
    1 0 0.65
    1 1 1.093


    Can you please help to understand what's my mistake and how should I approach this issue?
    Thanks,
    John


  • #2
    If you read the xtpoisson postestimation documentation for margins, you'll see that the default prediction is xb, not irr.

    Comment

    Working...
    X