Hi everyone!
How can I output to Latex (e.g. with esttab), after a logit model with interaction term (!), the respective incremental marginal effects of each variable (especially the interaction) instead of the logit coefficients (such that the interpretation of the incremental marginal effects is analogous to the interpretation of coefficients from a linear OLS regression)?
I want to output the incremental marginal probabilities of the logit model in a table with esttabalongside other tobit, OLS models.

Consider the following example.
Code:
sysuse auto, clear
gen binaryoutcome = weight>2000

//use reg instead of logit to see that margins below are calculated properly:
eststo mainmodel: logit binaryoutcome i.foreign##c.trunk

margins, dydx(i.foreign) at(c.trunk==0)
margins, dydx(c.trunk) at(foreign==0)

//effect of 1 'trunk' unit when foreign==1 in addition (!) to the effect of 1 'trunk' unit when foreign==0 and in addition (!) to 
//the differential offect of moving from foreign==0 to foreign==1
margins, dydx(c.trunk) over(foreign) pwcompare(effects)

esttab mainmodel, nobaselevels nonotes noobs nomtitle nonumber noline

I want to produce this table (here produced by hand); the coefficient values and z-stats are from the three margins commands from above:
Code:
binaryoutcome                
1.foreign           0.4430546   
                   (0.69)   

trunk               0.0138894   
                   (1.08)   

1.foreign#trunk    -.0109257   
                  (-0.36)

I have tried everything that I considered remotely possible:
  • saving the margins as a model and tabulating -- cannot assign the third value to the interaction "variable"; can only save a single margin
  • erepost -- can replace coefficients in mainmodel in e(b)[i,j], but don't know how to replace z and p values
  • estadd margins -- can only add a single margin ("e(margins_level) already defined" on second estadd margin); esttab shows non-incremental effects for i.foreign==0, i.foreign==1 when tabulating
  • estpost margins -- can only add a single margin ("option dydx() not allowed"); if using estimates restore mainmodel previous margins are gone; margins not showing after esttab
  • extract values and 'manually' replace in r(coefs), but don't know how to get original labels, titles, formats, z-stat below coef when tabulating matrix with estout
If this were a model without interaction I would simply, after the logit command, save the 'marginal effects at the means' as model and then tabulate:
Code:
eststo marginsmodel: margins, dydx(*) atmeans post
esttab marginsmodel

Please help me:
  1. Is my understanding of the marginal effects as calculated correct and my desired presentatin appropriate for a logit model with interaction?
  2. How do I get the incremental marginal effects from Stata into Latex, alongside other models?
Your help is much appreciated, I've been trying only this for 1.5 days now. Thank you all!