When I run the interaction between a dummy (0/1) variable (at3) and a categorical variable (vtype), the results from -xtreg- are very different to those from -margins-. I would like to know:
1) Why are the results from -xtreg- and -margins- so different?
2) is there a way to combine the results from -margins- to create a table using -esttab- or some other command?
The following code only creates a table of estimates obtained from -xtreg-:
I'm unable to provide an example at the moment but can do later if needed.
Stata v.15.1. Using panel data.
1) Why are the results from -xtreg- and -margins- so different?
2) is there a way to combine the results from -margins- to create a table using -esttab- or some other command?
The following code only creates a table of estimates obtained from -xtreg-:
Code:
xtreg c.finr i.at3##i.vtype margins i.faith2##i.at3 estimates store s1 xtreg c.nonfinr i.at3##i.vtype margins i.faith2##i.at3 estimates store s2 xtreg c.assetr i.at3##i.vtype margins i.faith2##i.at3 estimates store s3 xtreg c.debt i.at3##i.vtype margins i.faith2##i.at3 estimates store s4 xtreg c.wealth2r i.at3##i.vtype margins i.faith2##i.at3 estimates store s5 esttab s1 s2 s3 s4 s5 using interactions.rtf, b(%10.0fc) star(* 0.10 ** 0.05 *** 0.01) varwidth(35) not nogaps label stats(N r2) /// compress replace nonumbers title("Interaction effects" ) mtitle("""")
Stata v.15.1. Using panel data.
Comment