# esttab after margins? [closed]

I'm trying to output the average partial effects estimated after a regression but am having some difficulty. I realize using the margeff command works around this, but I have some interaction terms in my model and I can't get margeff to work with these. I know margins works, but when I run the code below, the .tex file reports the results of the glm.

eststo clear
eststo: glm y x1 x2 x3 c.x1#c.x2 c.x3#c.x3, link(logit) robust
esttab using 1.tex, label
eststo clear
glm y x1 x2 x3 c.x1#c.x2 c.x3#c.x3, link(logit) robust
margins, dydx(*)
estimates store margins
esttab using 2.tex, label
eststo clear

-

## closed as off-topic by gung, Dimitriy V. Masterov, COOLSerdash, Macro, Peter Flom♦Jul 13 at 0:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Questions about programming are off-topic here unless they involve statistical analysis in some fashion, but they can be asked on Stack Overflow." – gung, Dimitriy V. Masterov, COOLSerdash, Macro, Peter Flom
If this question can be reworded to fit the rules in the help center, please edit the question.

glm .....

The key point here is the post option in margins, that tells margins to leave the results behind as if it were an estimation command. This helps because esttab looks for stuff left behind by estimation commands.