Announcement

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

  • Interpreting marginal effects after ologit (1 control, 2 treatment groups)

    Hello, I have run
    ologit playercontorder i.treatment i.below30 i.gender i.gov i.nationality i.school i.av_h_income i.child i.level i.student_level i.married i.order

    margins, dydx(i.treatment)
    and want to get the marginal effect of treatment. The control group is the base, and the outcome variable playercontorder is the level of contribution (in $).
    I am a bit unclear as to how to interpret the marginal effects (table below).
    Is this for e.g., correct: being in treatment 1, relative to the control group, decreases the prob of not contributing (level 1 of playercontorder) by 0.98%, on average?

    Click image for larger version

Name:	Picture1.png
Views:	1
Size:	22.8 KB
ID:	1762168
    Last edited by Ghanimah Almunaifi; 22 Aug 2024, 06:43.

  • #2
    Yes. The marginal effect (dy/dx) puts the estimates into a probability increase/decrease metric. Another handy tool for looking at these results is the mtable command, which is in the user-written program spost13 (search spost13). It will give you a table of the predictions for all groups. Here's an example:
    Code:
    webuse nhanes2f, clear
    ologit health i.region i.sex i.race weight
    mtable, at(region = (1(1)4))
    Resulting in the following table:
    Code:
    Expression: Pr(health), predict(outcome())
    
               |   region      poor      fair   average      good  excellent
     ----------+------------------------------------------------------------
             1 |        1     0.056     0.136     0.268     0.266      0.274
             2 |        2     0.060     0.144     0.274     0.262      0.260
             3 |        3     0.087     0.189     0.301     0.233      0.191
             4 |        4     0.075     0.171     0.292     0.246      0.216
    You could reconstruct this table from the margins, dydx output, but this is much easier. You can further specify whether you want the predictions at various covariate values for other predictors in the model, just as you can with margins.
    Code:
    mtable, at(region = (1(1)4) weight = (61 71 81))
    
    Expression: Pr(health), predict(outcome())
    
               |   region    weight      poor      fair   average      good  excellent
     ----------+----------------------------------------------------------------------
             1 |        1        61     0.052     0.129     0.261     0.269      0.288
             2 |        1        71     0.055     0.136     0.267     0.267      0.275
             3 |        1        81     0.059     0.143     0.273     0.263      0.262
             4 |        2        61     0.056     0.137     0.268     0.266      0.273
             5 |        2        71     0.059     0.143     0.274     0.263      0.261
             6 |        2        81     0.063     0.150     0.279     0.259      0.248
             7 |        3        61     0.081     0.180     0.298     0.239      0.202
             8 |        3        71     0.086     0.188     0.301     0.234      0.192
             9 |        3        81     0.091     0.196     0.303     0.228      0.182
            10 |        4        61     0.070     0.163     0.288     0.251      0.228
            11 |        4        71     0.075     0.170     0.292     0.246      0.217
            12 |        4        81     0.079     0.178     0.296     0.241      0.206
    As usual, Richard Williams primer on margins with multicategory outcome models is highly recommended.
    Last edited by Erik Ruzek; 22 Aug 2024, 14:06. Reason: Updated code to find spost13 per RW's post #3

    Comment


    • #3
      One correction: spost13 is on Long's personal site, not on ssc. So, to find and install, give the command

      search spost13

      The spost commands are mostly shells for margins, but they can produce easier to read output.
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      StataNow Version: 19.5 MP (2 processor)

      EMAIL: [email protected]
      WWW: https://www3.nd.edu/~rwilliam

      Comment


      • #4
        Thank you for the tips Erik Ruzek Richard Williams !

        Comment

        Working...
        X