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?
Related Posts with xtlogit, margins dydx with interaction terms
variable _mi_miss not foundI am attempting to import imputed data into a data set using the command, mi import wide. It results…
merging Compustat Fundamentals annual data and daily security dataDear Statalist members, For my thesis, I need to merge daily security data to Fundamentals annual d…
Comparing means across groups using svy commands and esttabDear STATA users I hope someone can help me. I am having a really hard time making a - what I thoug…
How to generate a new variable as a non-algebraic combination of valuesHi, I have the following data and v6 has years and v7 has months. I want to overwrite v6 whose value…
Matching on Assets and FF 48 Industry GroupsDear Statalist users, I'm am trying to match a sample within Stata, not yet sucessfully. I have a s…
Subscribe to:
Post Comments (Atom)
0 Response to xtlogit, margins dydx with interaction terms
Post a Comment