I am running the following multinomial logistic regression in stata:
mlogit employment_status_18 i.sex_12 i.educa_12 i.age_12 i.urban_12 i.maritall_12 hhsize i.educ_fath_12 i.mariall_12#i.sex_12
where
employment_status_18 is the unordered categorical outcome variable that takes four values
and the following are the regressors:
sex_12: binary, male or females
educa_12 educational attainment , categorical , four categories
age_12 age , categorical
urban_12 area of residence urban/rural
maritall_12: marital status, married/not married
hhsize: household size , discrete
educ_fath_12 father's educational attainment, four categories
and finally the interaction between sex and marital status
After estimation, I used the margins command to produce average marginal effects as follows:
margins, dydx(*)
As expected, the margins command doesn't produce marginal effects for the interaction. funny thing is when I use outreg2 to export the results of the margin command to word, the word file contains all regressors and the interaction term as well? I did not know if I should trust this estimate. when I searched on google everyone said that the margins command won't calculate marginal effects for interactions.
So, I searched the we and found that i could use the following command instead to produce marginal effects for the interaction
margins, dydx(maritall_12) at (sex_12 = 1)
margins, dydx(maritall_12) at (sex_12 = 1)
note that in maritall_12:
1: married - reference category
2: not married
in sex_12
1: female - reference
2: male
margins, dydx(maritall_12) at (sex_12 = 1)
Average marginal effects Number of obs = 3,992
Model VCE : OIM
dy/dx w.r.t. : 2.maritall_12
1._predict : Pr(employment_status_18==formal), predict(pr outcome(1))
2._predict : Pr(employment_status_18==informal), predict(pr outcome(2))
3._predict : Pr(employment_status_18==self_emp), predict(pr outcome(3))
4._predict : Pr(employment_status_18==nonemployed), predict(pr outcome(4))
at : sex_12 = 1
--------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
---------------+----------------------------------------------------------------
2.maritall_12 |
_predict |
1 | -.0961436 .0226144 -4.25 0.000 -.140467 -.0518203
2 | .0493267 .0116658 4.23 0.000 .0264621 .0721913
3 | .0014853 .0023842 0.62 0.533 -.0031877 .0061584
4 | .0453316 .0212919 2.13 0.033 .0036002 .087063
--------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
. margins, dydx(maritall_12) at (sex_12 = 2)
Average marginal effects Number of obs = 3,992
Model VCE : OIM
dy/dx w.r.t. : 2.maritall_12
1._predict : Pr(employment_status_18==formal), predict(pr outcome(1))
2._predict : Pr(employment_status_18==informal), predict(pr outcome(2))
3._predict : Pr(employment_status_18==self_emp), predict(pr outcome(3))
4._predict : Pr(employment_status_18==nonemployed), predict(pr outcome(4))
at : sex_12 = 2
--------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
---------------+----------------------------------------------------------------
2.maritall_12 |
_predict |
1 | -.1355138 .024689 -5.49 0.000 -.1839033 -.0871243
2 | .106699 .0217271 4.91 0.000 .0641147 .1492834
3 | .0067008 .0149922 0.45 0.655 -.0226834 .0360851
4 | .0221139 .0146768 1.51 0.132 -.0066521 .05088
--------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
my problem is. I am not sure how should I interpret the results of these commands? what is the reference category in this case?
Also is there any other way to calculate average marginal effects for interaction terms in Stata
Thanks for your time
mlogit employment_status_18 i.sex_12 i.educa_12 i.age_12 i.urban_12 i.maritall_12 hhsize i.educ_fath_12 i.mariall_12#i.sex_12
where
employment_status_18 is the unordered categorical outcome variable that takes four values
and the following are the regressors:
sex_12: binary, male or females
educa_12 educational attainment , categorical , four categories
age_12 age , categorical
urban_12 area of residence urban/rural
maritall_12: marital status, married/not married
hhsize: household size , discrete
educ_fath_12 father's educational attainment, four categories
and finally the interaction between sex and marital status
After estimation, I used the margins command to produce average marginal effects as follows:
margins, dydx(*)
As expected, the margins command doesn't produce marginal effects for the interaction. funny thing is when I use outreg2 to export the results of the margin command to word, the word file contains all regressors and the interaction term as well? I did not know if I should trust this estimate. when I searched on google everyone said that the margins command won't calculate marginal effects for interactions.
So, I searched the we and found that i could use the following command instead to produce marginal effects for the interaction
margins, dydx(maritall_12) at (sex_12 = 1)
margins, dydx(maritall_12) at (sex_12 = 1)
note that in maritall_12:
1: married - reference category
2: not married
in sex_12
1: female - reference
2: male
margins, dydx(maritall_12) at (sex_12 = 1)
Average marginal effects Number of obs = 3,992
Model VCE : OIM
dy/dx w.r.t. : 2.maritall_12
1._predict : Pr(employment_status_18==formal), predict(pr outcome(1))
2._predict : Pr(employment_status_18==informal), predict(pr outcome(2))
3._predict : Pr(employment_status_18==self_emp), predict(pr outcome(3))
4._predict : Pr(employment_status_18==nonemployed), predict(pr outcome(4))
at : sex_12 = 1
--------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
---------------+----------------------------------------------------------------
2.maritall_12 |
_predict |
1 | -.0961436 .0226144 -4.25 0.000 -.140467 -.0518203
2 | .0493267 .0116658 4.23 0.000 .0264621 .0721913
3 | .0014853 .0023842 0.62 0.533 -.0031877 .0061584
4 | .0453316 .0212919 2.13 0.033 .0036002 .087063
--------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
. margins, dydx(maritall_12) at (sex_12 = 2)
Average marginal effects Number of obs = 3,992
Model VCE : OIM
dy/dx w.r.t. : 2.maritall_12
1._predict : Pr(employment_status_18==formal), predict(pr outcome(1))
2._predict : Pr(employment_status_18==informal), predict(pr outcome(2))
3._predict : Pr(employment_status_18==self_emp), predict(pr outcome(3))
4._predict : Pr(employment_status_18==nonemployed), predict(pr outcome(4))
at : sex_12 = 2
--------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
---------------+----------------------------------------------------------------
2.maritall_12 |
_predict |
1 | -.1355138 .024689 -5.49 0.000 -.1839033 -.0871243
2 | .106699 .0217271 4.91 0.000 .0641147 .1492834
3 | .0067008 .0149922 0.45 0.655 -.0226834 .0360851
4 | .0221139 .0146768 1.51 0.132 -.0066521 .05088
--------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
my problem is. I am not sure how should I interpret the results of these commands? what is the reference category in this case?
Also is there any other way to calculate average marginal effects for interaction terms in Stata
Thanks for your time
Comment