Hi everyone, and thank you in advance for helping me with the problem i'll now briefly introduce.
I'im running a gologit2 on a dependent variable with five ordered categories. The model is the following:
gologit2 volunteering i.grandchildren2 i.caringchgr_nt1 age i.male i.edulevel i.socioeconclass i.work_net i.cohabiting i.municipality i.arean4, autofit lrforce
where grandchildren2 is the main covariate and has as well three ordered categroies
Then i calculate the AME for my main covariate:
margins, dydx(i.grandchildren2) post;
and i plot the using the following code:
coefplot (, keep(*:1._predict) label("Not at all")) ///
(, keep(*:2._predict) label("A little")) ///
(, keep(*:3._predict) label("Moderately")) ///
(, keep(*:4._predict) label("Quite a bit")) ///
(, keep(*:5._predict) label("Very much")), ///
swapnames xline(0) legend(off) ///
grid(between glcolor(black) glpattern(dash)) ///
ytitle() ///
xtitle() ///
title("") name(grafico1, replace)
The resuly i get is fine, but the problem is when i run the same model including an interaction term:
gologit2 volunteering i.grandchildren2##i.work_net i.caringchgr_nt1 age i.male i.edulevel i.socioeconclass i.cohabiting i.municipality i.arean4, autofit lrforce
where grandchildren2 is the same as before and work is again an ordered with three categories.
My problem is how to manage with plotting in a clear way the marginal effects for this interaction. I would appreciate any suggestion (feel free to make any observation also on the code i use to plot the AME from the model with no interaction)
I'im running a gologit2 on a dependent variable with five ordered categories. The model is the following:
gologit2 volunteering i.grandchildren2 i.caringchgr_nt1 age i.male i.edulevel i.socioeconclass i.work_net i.cohabiting i.municipality i.arean4, autofit lrforce
where grandchildren2 is the main covariate and has as well three ordered categroies
Then i calculate the AME for my main covariate:
margins, dydx(i.grandchildren2) post;
and i plot the using the following code:
coefplot (, keep(*:1._predict) label("Not at all")) ///
(, keep(*:2._predict) label("A little")) ///
(, keep(*:3._predict) label("Moderately")) ///
(, keep(*:4._predict) label("Quite a bit")) ///
(, keep(*:5._predict) label("Very much")), ///
swapnames xline(0) legend(off) ///
grid(between glcolor(black) glpattern(dash)) ///
ytitle() ///
xtitle() ///
title("") name(grafico1, replace)
The resuly i get is fine, but the problem is when i run the same model including an interaction term:
gologit2 volunteering i.grandchildren2##i.work_net i.caringchgr_nt1 age i.male i.edulevel i.socioeconclass i.cohabiting i.municipality i.arean4, autofit lrforce
where grandchildren2 is the same as before and work is again an ordered with three categories.
My problem is how to manage with plotting in a clear way the marginal effects for this interaction. I would appreciate any suggestion (feel free to make any observation also on the code i use to plot the AME from the model with no interaction)
Comment