Announcement

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

  • Interpretation of margins after xtpoisson with interaction

    Hi,
    this is likely very simple, but I cannot wrap my head around it. I am running an xtpoisson model with two continuous predictors that are both standardized. How do I interpret the margins?
    I constructed a little demo below. The dependent variables is a count (obviously), "number of weeks worked" in the demo data. Nevermind that one would likely not standardize any of the independent variables in this dataset, but in my real data I think it would make sense.

    Code:
    webuse nlswork.dta, clear
    xtset idcode year
    
    * run regression once to determine sample
    xtpoisson wks_work c.birth_yr##c.ttl_exp
    keep if e(sample)
    
    * standardize independent variables over full sample
    egen z_birth_yr = std(birth_yr)
    egen z_ttl_exp = std(ttl_exp)
    drop birth_yr ttl_exp
    rename z_birth_yr birth_yr
    rename z_ttl_exp ttl_exp
    
    * run regression of interest
    xtpoisson wks_work c.birth_yr##c.ttl_exp
    
    * obtain margins
    margins, at(birth_yr = (-2/1) ttl_exp = (-1 4))
    This yields the following result:

    Code:
    (omitted)
    
    
    . * obtain margins
    . margins, at(birth_yr = (-2/1) ttl_exp = (-1 4))
    
    Adjusted predictions                                    Number of obs = 27,831
    Model VCE: OIM
    
    Expression: Linear prediction, predict()
    1._at: birth_yr = -2
           ttl_exp  = -1
    2._at: birth_yr = -2
           ttl_exp  =  4
    3._at: birth_yr = -1
           ttl_exp  = -1
    4._at: birth_yr = -1
           ttl_exp  =  4
    5._at: birth_yr =  0
           ttl_exp  = -1
    6._at: birth_yr =  0
           ttl_exp  =  4
    7._at: birth_yr =  1
           ttl_exp  = -1
    8._at: birth_yr =  1
           ttl_exp  =  4
    
    ------------------------------------------------------------------------------
                 |            Delta-method
                 |     Margin   std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             _at |
              1  |   3.645507   .0122726   297.04   0.000     3.621453     3.66956
              2  |   4.865549   .0147649   329.53   0.000      4.83661    4.894488
              3  |   3.630847   .0078433   462.92   0.000     3.615475     3.64622
              4  |   4.972935   .0093784   530.25   0.000     4.954554    4.991317
              5  |   3.616188    .005467   661.45   0.000     3.605473    3.626903
              6  |   5.080322   .0066949   758.83   0.000       5.0672    5.093443
              7  |   3.601529   .0074654   482.43   0.000     3.586897    3.616161
              8  |   5.187708    .009413   551.12   0.000     5.169259    5.206157
    ------------------------------------------------------------------------------
    How do I interpret the margins in a way that would allow me to interpret them in a "....and this means x more weeks worked" way?

    Thank you so much!

    Michael
    Last edited by Michael Reuter; 10 Jun 2023, 13:56.
Working...
X