Announcement

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

  • xtlogit, margins dydx with interaction terms

    I am working with a logit panel data model with interaction terms.

    My objective is to estimate the marginal effect of one of the regressors (call it X1) on my dep. variable Y. My regressor of interest also appears interacted with other regressors (say X2). My model has both groups and time fixed effects (for simplicity I will drop the time fixed effects from my explanation below since I believe they are not a concern for my main argument).

    I can easily compute margins, dydx under the assumption that the groups fixed effects are 0. However, I would like to keep the fixed effects in the margin calculation. I am following the Mundlak-Chamberlain method (see https://www.stata.com/meeting/spain1...s14_pinzon.pdf ). However this "transformed" model contains interaction terms which prevent the use of margins in the usual manner (see on this the last page of https://journals.sagepub.com/doi/10....867X1301300105).

    The turnaround that I follow is instead to write down and plug-in my model as an expression() within the margin command; specifically after estimating the model I manually write down

    dp/dX1 = e^(-g(Y,X1,X2))/(1+e^(-g(Y,X1,X2))) * g'(Y,X1,X2)

    and the command becomes:

    margins, expression(dp/dX1) , over(year ID)

    where ID is the group variable and year is the time.

    I want to compute the marginal effect of a change in X1 for each possible level of X2 and this is why I include the over(year ID).--on a side note, is this equivalent to specifying at() in my case?

    Is my approach correct for what concerns estimates and (delta est) standard error? If not, are there other solutions?






    Last edited by Luigi Durand; 22 Mar 2020, 15:50.
Working...
X