Dear all,
I have had some trouble calculating one of the marginal effects of my regression. I am running the following regression:
Code:
xtreg manemp lnpop lnpop2 lngdppc lngdppc2 _2000s _2010s 1._2000s#1.la 1._2010s#1.la, fe
My main variables of interest are
_2000s and
_2010s, which are two decadal dummies and the interaction term between the indicator variable
la, which is an indicator variable for a specific region, Latin America, and the two decadal dummies. I do this in order to estimate how much of the period dummies vary by region (in this case Latin America). My results are as follows:
Code:
esttab, drop(_cons lnpop lnpop2 lngdppc lngdppc2)
----------------------------
(1)
manemp
----------------------------
_2000s -0.00286
(-1.51)
_2010s 0.00128
(0.42)
1._2000s#1~a -0.00849**
(-2.68)
1._2010s#1~a -0.0132***
(-3.97)
----------------------------
N 1479
----------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
I am quite happy with these results, but now I am trying to calculate the marginal effect of the specific region, Latin America, compared to the full sample. This is in fact pretty simple, as I can just add the coefficients for_2000s (-0.00286) and for _2000s X la (-0.00849) which should be equal to -0,01176. I want to compute the marginal effects for both decadal dummies, specifically when my indicator variable, in this case, la, is equal to 1. I want to compute the marginal effects using:
Code:
margins dydx(varlist)
I have tried to get the results I wanted using the different options in the stata manual (
https://www.stata.com/manuals13/rmargins.pdf) with trial and error, but I have not been able to get the results I want just yet. Does anyone have some advice perhaps?
A second question, perhaps unrelated, I am dealing with panel data on 51 countries over 29 years. I want to run the specified regressions and obtain the marginal effects for 7 different regions (Latin America being one) and for 51 different countries. So this means I want to run 58 regressions. Is there a somewhat efficient way to do this?
Thank you in advance.
Best,
Hylke Dijkstra
0 Response to Calculating Marginal Effects
Post a Comment