Hi!
I cannot get the margins command to work at the specific regressions that I am trying to interpret. I'm using Stata 17.
I'm exploring a model with electoral outcomes as the dependent variable (inc_sup) for men and women in different categories of work (different industries). I have significant interactions between gender and one of the categories in the variable work. There are also theoretical reasons to include interaction with some of the industries. I therefore only interacted a subset of the categories with gender. I kept the other categories without interaction. I have also added a binary variable for region (state). So far so good. The regression output provides satisfying results.
Code:
However, when I now try to use margins to ease interpretation I can't make it work, and instead only get not estimable outputs.
Why is that? And what could be done to overcome the problem? All help is greatly appreciated.
I would like to explore the marginal effects of the interaction between sex and industry 1,2 and 9. How do I do that, suing margins?
Best
I cannot get the margins command to work at the specific regressions that I am trying to interpret. I'm using Stata 17.
I'm exploring a model with electoral outcomes as the dependent variable (inc_sup) for men and women in different categories of work (different industries). I have significant interactions between gender and one of the categories in the variable work. There are also theoretical reasons to include interaction with some of the industries. I therefore only interacted a subset of the categories with gender. I kept the other categories without interaction. I have also added a binary variable for region (state). So far so good. The regression output provides satisfying results.
Code:
Code:
reg inc_sup i.sex##i(2 3 9).work i(1 4 5 6 7 8).work c.income##c.income i.state
Why is that? And what could be done to overcome the problem? All help is greatly appreciated.
Code:
Source | SS df MS Number of obs = 3,526 -------------+---------------------------------- F(15, 3510) = 131.23 Model | 558.754934 15 37.2503289 Prob > F = 0.0000 Residual | 996.301832 3,510 .283846676 R-squared = 0.3593 -------------+---------------------------------- Adj R-squared = 0.3566 Total | 1555.05677 3,525 .441150856 Root MSE = .53277 ----------------------------------------------------------------------------------- inc_sup | Coefficient Std. err. t P>|t| [95% conf. interval] ------------------+---------------------------------------------------------------- 1.sex | -.6713489 .0229698 -29.23 0.000 -.7163843 -.6263135 | work | Industry 1 | -.0557566 .0527001 -1.06 0.290 -.1590825 .0475694 Industry 2 | .1029184 .0532589 1.93 0.053 -.0015031 .20734 Industry 3 | .3283913 .0383965 8.55 0.000 .2531095 .4036731 Industry 4 | .1668998 .0390707 4.27 0.000 .0902962 .2435033 Industry 6 | .0594821 .0380795 1.56 0.118 -.015178 .1341422 Industry 7 | .3334208 .0390263 8.54 0.000 .2569043 .4099372 Industry 8 | .1202785 .03824 3.15 0.002 .0453037 .1952534 Industry 9 | .3157184 .0525634 6.01 0.000 .2126605 .4187763 | sex#work | 1#Industry 1 | .0724496 .0594337 1.22 0.223 -.0440785 .1889778 1#Industry 2 | -.0136424 .0596 -0.23 0.819 -.1304965 .1032117 1#Industry 9 | -.344365 .0594324 -5.79 0.000 -.4608906 -.2278395 | income | .0257586 .0033238 7.75 0.000 .0192419 .0322754 | c.income#c.income | -.000686 .0000902 -7.60 0.000 -.0008629 -.0005091 | 1.state | .0023146 .0198355 0.12 0.907 -.0365757 .0412049 _cons | 4.978542 .0436143 114.15 0.000 4.89303 5.064054 -----------------------------------------------------------------------------------
Code:
Delta-method dy/dx std. err. t P>t [95% conf. interval] 1.sex . (not estimable) work Industry 1 . (not estimable) Industry 2 . (not estimable) Industry 3 . (not estimable) Industry 4 . (not estimable) Industry 6 . (not estimable) Industry 7 . (not estimable) Industry 8 . (not estimable) Industry 9 . (not estimable) income .002162 .0009772 2.21 0.027 .000246 .004078 1.state . (not estimable) Note: dy/dx for factor levels is the discrete change from the base level.
Best
Comment