Announcement

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

  • Is it possible to calculate AMEs for non-linear interactions

    My logistic regression model includes the following interaction:

    x1*x2*time*time^2

    Where x1 and x2 are both dummy variables, and time is a variable ranging from 0 to 25.

    In a previous model that only contains a x1*x2 interaction, I was able to calculate the AME of the interaction term using the following code (I am using mi imputed data):

    Code:
    mimrgns x1, dydx(x2) predict(pr) pwcompare
    Is it also possible for me to calculate individual AME values to be presented in a regression table for the interaction terms that arise from my more complex model, namely:

    x1*x2

    x1*time
    x2*time

    x1*time^2
    x2*time^2

    x1*time*time^2
    x2*time*time^2

    If so, how should I go about doing it? (I'm using StataSE v16.01)

    At present, I am presenting log-odds in the regression table to give an initial idea of the relationships, and then plotting the AMEs over time, but I have received feedback asking me to already present AMEs in the regression table as well, which is why I am asking.

    Thank you!
    Last edited by Sarah Thea Smith; 17 Mar 2023, 10:57. Reason: Added tags

  • #2
    The conventional thinking is that there is no marginal effect for an interaction term. You cannot change the interaction term independently, holding constant its constituent terms. I would refer you to Richard Williams's SJ article and slides which have an extensive discussion on marginal effects, including the point I make. So if I were you, I would not follow some of these old literature - but it is no criticism on the literature itself. See https://www3.nd.edu/~rwilliam/stats/Margins01.pdf and https://www.stata-journal.com/articl...article=st0260.

    Comment


    • #3
      Thank you, that is very helpful.

      Would you argue the same in the case of the cross-sectional example with two dummies? In that case being able to calculate a single AME value for a table did make sense to me given that both variables are either 0 or 1, so the AME of the interaction term is essentially the difference between x1 when x2=0, and x1 when x2=1 (and vice versa), but I don't know whether presenting an AME table goes against convention no matter what.

      Comment


      • #4
        With the -contrast- option of margins, you can compute the discrete interaction effects as I illustrated in your earlier thread. The approach is not incorrect, but I don't see people doing that these days. And probably readers would have a hard time interpreting what these results are. Usually, they report the logit/ probit coefficients and if also reporting AMEs, these do not include interaction terms (as the -dydx()- option of margins will drop these). Outside economics, odds ratios are popular and few researchers report AMEs. Have you looked at recent publications in your field? What do they do?

        Comment


        • #5
          Thank you, that makes sense. Odds ratios do seem the most common in my field, but my supervisor is adamant that I should present AMEs, and he does know the field better than me. I will discuss this with him again!

          Comment

          Working...
          X