Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

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
share|improve this question

closed as off-topic by gung, Dimitriy V. Masterov, COOLSerdash, Macro, Peter Flom Jul 13 '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.

1 Answer 1

Just use:

glm .....
margins, dydx(_all) post
esttab using x.tex, label

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.

share|improve this answer
    
Is margins, dydx(_all) any different from margins, dydx(*)? –  non-numeric_argument yesterday

Not the answer you're looking for? Browse other questions tagged or ask your own question.