Dear forum members,
This is the first time I have to work with Tobit regressions and with the Stata command 'margins' and I'm relatively inexperienced with Stata in general, so I am very open to learning from you.
I have tried as best as I can to look in the forum archive and other sources to find the solution to the two problems I have, but I am a bit unsure about the right approach and worried that I choose wrong and thus obtain incorrect results/conclusions.
My continuous dependent variable is amount of time (spent on child care), my two categorical independent variables are maternal education (level 1: primary, level 2: secondary, level 3: tertiary) and child age (level 1: 0-4, level 2: 5-12, level 3: 13-17), and my two continuous control variables are family size and maternal age.
Based on advice in this forum (e.g. from Richard Williams to use factor notation instead of manually generating dummies or interaction terms), I constructed my regression equation as follows: tobit allchildcare1 ib2.edtry i.agekid i.edtry#i.agekid nchild age1, ll(0).
First, I need marginal effects on the unconditional expected value (I think these are average marginal effects (AMEs)?), which - if I've understood it correctly - can be found by using the command: margins, dydx(*) predict (ystar(0,.)) post. (Is that true, also in this setting with categorical independent variables?)
However, Stata does not present the marginal effects for the four interaction terms. I read that this is perfectly normal, but I really need those (and the standard errors) for my analysis (mainly to find out whether they are significant or not).
So, in short, how can you use Stata to obtain the marginal effects for categorical-categorical interaction terms?
I came across several possibilities online but I am unsure which I should use, i.e. which one is correct.
For example, to find the marginal effect for primary x 5-12 I thought of margins, dydx(edtry) at(agekid==2) predict (ystar(0,.)) post but I get a different effect if I use margins, dydx(agekid) at(edtry==1) predict (ystar(0,.)) post (maybe that's obvious, but now I don't know which to use), and the results seem strange to me.
Vince Wiggens (https://www.stata.com/statalist/arch.../msg00293.html) suggests margins r.edtry#r.agekid (I have again added the option predict (ystar(0,.))), but then you get 'contrasts of predictive margins' and no longer 'average marginal effects' like the other marginal effects and I am unsure about that (I think that's something else).
[Second, I want to use the marginal effects to generate predicted means (predicted mean amounts of time spent on child care) at specific levels of maternal education and child age (to ultimately display those in a nice figure using e.g. 'marginsplot'). How can I do that with Stata?]
Thanks in advance for any help or advice you can offer. If you need more information first, then please let me know.
Anna
This is the first time I have to work with Tobit regressions and with the Stata command 'margins' and I'm relatively inexperienced with Stata in general, so I am very open to learning from you.
I have tried as best as I can to look in the forum archive and other sources to find the solution to the two problems I have, but I am a bit unsure about the right approach and worried that I choose wrong and thus obtain incorrect results/conclusions.
My continuous dependent variable is amount of time (spent on child care), my two categorical independent variables are maternal education (level 1: primary, level 2: secondary, level 3: tertiary) and child age (level 1: 0-4, level 2: 5-12, level 3: 13-17), and my two continuous control variables are family size and maternal age.
Based on advice in this forum (e.g. from Richard Williams to use factor notation instead of manually generating dummies or interaction terms), I constructed my regression equation as follows: tobit allchildcare1 ib2.edtry i.agekid i.edtry#i.agekid nchild age1, ll(0).
First, I need marginal effects on the unconditional expected value (I think these are average marginal effects (AMEs)?), which - if I've understood it correctly - can be found by using the command: margins, dydx(*) predict (ystar(0,.)) post. (Is that true, also in this setting with categorical independent variables?)
However, Stata does not present the marginal effects for the four interaction terms. I read that this is perfectly normal, but I really need those (and the standard errors) for my analysis (mainly to find out whether they are significant or not).
So, in short, how can you use Stata to obtain the marginal effects for categorical-categorical interaction terms?
I came across several possibilities online but I am unsure which I should use, i.e. which one is correct.
For example, to find the marginal effect for primary x 5-12 I thought of margins, dydx(edtry) at(agekid==2) predict (ystar(0,.)) post but I get a different effect if I use margins, dydx(agekid) at(edtry==1) predict (ystar(0,.)) post (maybe that's obvious, but now I don't know which to use), and the results seem strange to me.
Vince Wiggens (https://www.stata.com/statalist/arch.../msg00293.html) suggests margins r.edtry#r.agekid (I have again added the option predict (ystar(0,.))), but then you get 'contrasts of predictive margins' and no longer 'average marginal effects' like the other marginal effects and I am unsure about that (I think that's something else).
[Second, I want to use the marginal effects to generate predicted means (predicted mean amounts of time spent on child care) at specific levels of maternal education and child age (to ultimately display those in a nice figure using e.g. 'marginsplot'). How can I do that with Stata?]
Thanks in advance for any help or advice you can offer. If you need more information first, then please let me know.
Anna
Comment