Announcement

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

  • Margins command and interaction term

    Hi,

    I am estimating a simple regression with interactions Y=a+bX+cZ+dXZ+error using the following command:
    Code:
    regress Y c.X##c.Z, robust
    Then, I estimate the marginal effects of X and Z using the following command:
    Code:
    margins, dydx(X Z)
    After that, I compute the marignal effects simply using the following commands:
    Code:
    regress Y X Z, robust
    margins, dydx(X Z)
    The problem is that the estimated marginal effect of X is much larger in the regression without interaction term compared to the regression with the interaction term, while the marginal effect of Z is almost identical in the regression with and without interaction term.

    Would you reckon why that may be the case? How can the interaction term change the marginal effect on X so much while the marginal effect on Z is almost unchanged?

    Thanks

    Lukas
    ------
    I use Stata 17

  • #2
    Clyde Schechter frequently discusses the interpretation of coefficients and margins in models with interaction terms. Perhaps you will find these recent discussions helpful.

    https://www.statalist.org/forums/for...raction-effect

    https://www.statalist.org/forums/for...ction-variable

    Comment


    • #3
      Thank you William for your reply. The posts that you highlight are helpful. However, I am still uncertain about the potentially correct terminology to use, so I would appreciate your further help on this.

      My understanding from reading the posts is that the marginal effects estimated, as showed in post #1, from the interaction and the non-interaction regression cannot be compared. Thus, there is no reason to expect such marginal effects to be similar.

      The marginal effect from the non-interaction regression complies with the traditional definition of marginal effect, while the marginal effect from the interaction regression is rather an average of marginal effects of say X across the infinite values of Z (since both X and Z are continuous variables).

      So, my question is: would I be correct in saying that what I get from the margins command after the interaction regression is an average marginal effect rather than a marginal effect?

      Thanks again,

      Lukas
      ------
      I use Stata 17

      Comment


      • #4
        Yes, the output of -margins, dydx(X Z)- after -regress Y c.X##c.Z- consists of the average marginal effects of X and Z on Y. More specifically, you have the average marginal effect of X, averaged over the distribution of Z, and the average marginal effect of Z, averaged over the distribution of X.

        Comment


        • #5
          Thank you for your help!

          Lukas
          ------
          I use Stata 17

          Comment

          Working...
          X