Announcement

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

  • Marginal effects after logit

    Hello everyone,

    I run a logit model with an interaction between two dummy variables. I use the user-written command -inteff- to estimate marginal effects based on Norton et al.'s (2004) paper published in The Stata Journal. The results that I obtain are similar by applying margins command:
    Code:
    logit y x i.a##i.b, vce(robust)
    margins r.a#r.b
    where a and b are the two dummy variables. I also want to interpret the results in terms of odds-ratio. I have read the paper of Buis (2010) from The Stata Journal which suggests the following:
    Code:
    logit y x i.a##i.b, vce(robust) or
    margins, over(a b) expression(exp(xb())) post
    lincom 1.a#1.b - 1.a#0.b
    where the last line gives the marginal effect in terms of odds-ratio (I want to see the marginal effect of my interest variable, a, in the presence of b vs. the absence of b). However, I'm not sure whether my approaches are correct. Any suggestion will be highly appreciated.
    Last edited by Nicu Sprincean; 08 Nov 2022, 10:02.

  • #2
    I use the user-written command -inteff- to estimate marginal effects based on Norton et al.'s (2004) paper published in The Stata Journal. The results that I obtain are similar by applying margins command:
    Code:

    logit y x i.a##i.b, vce(robust) margins r.a#r.b
    Well, the output from that -margins command does not give marginal effects. It gives predictive margins (i.e. expected probabilities) at combinations of values of a and b. For marginal effects in the probability metric you would want:
    Code:
    margins a, dydx(b)
    margins b, dydx(a)
    However, the code you modeled on the Buis paper looks correct for marginal effect in the odds ratio metric.

    Comment


    • #3
      The point of my paper is that you don't need marginal effects if you just look at odds ratios.
      ---------------------------------
      Maarten L. Buis
      University of Konstanz
      Department of history and sociology
      box 40
      78457 Konstanz
      Germany
      http://www.maartenbuis.nl
      ---------------------------------

      Comment


      • #4
        Originally posted by Clyde Schechter View Post

        Well, the output from that -margins command does not give marginal effects. It gives predictive margins (i.e. expected probabilities) at combinations of values of a and b. For marginal effects in the probability metric you would want:
        Code:
        margins a, dydx(b)
        margins b, dydx(a)
        However, the code you modeled on the Buis paper looks correct for marginal effect in the odds ratio metric.
        Thank you, Clyde Schechter, for your response. Interesting, the command
        Code:
        logit y x i.a##i.b, vce(robust)
        margins r.a#r.b
        gives me almost exactly the same output as for -inteff- where the authors claim to estimate "interaction effects" (as far as I understand, this is a synonym for marginal effects). Should I suppose that their approach is not correct? I have read this post
        HTML Code:
        https://www.stata.com/statalist/archive/2013-01/msg00293.html
        stating that interaction effects can be estimated as follows:
        Factor-factor "interaction effects" can also be estimated using the contrast operators. For model,
        logit A##B ... type, .
        margins r.A#r.B
        to estimate the average "interaction effect"
        Thank you, again, for your help.
        Last edited by Nicu Sprincean; 08 Nov 2022, 22:55.

        Comment


        • #5
          Originally posted by Maarten Buis View Post
          The point of my paper is that you don't need marginal effects if you just look at odds ratios.
          Thank you, Maarten Buis, for your response.

          Comment


          • #6
            My apologies. I ignored the r. operators in your -margins- command, and gave you incorrect information. I was thinking about -margins a#b-, which is different.

            Comment


            • #7
              Originally posted by Clyde Schechter View Post
              My apologies. I ignored the r. operators in your -margins- command, and gave you incorrect information. I was thinking about -margins a#b-, which is different.
              Clyde Schechter The command that you gave me, augmented with -pwcompare-, produces the same output as my initial command:
              Code:
               margins b, dydx(a) pwcompare

              Comment

              Working...
              X