Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: margins

From   Christopher Baum <>
To   Alessandro Oliveira <>
Subject   st: Re: margins
Date   Wed, 29 Aug 2012 14:37:50 +0000

The old mfx command works as always, but it generates marginal effects at the mean rather than average marginal effects (AMEs). The latter are generally preferred.

If you use the post option on margins, it wipes out the ereturns, so anything from the regression ereturns are now inaccessible. The following logic can be used to combine information from the regress ereturns and the margins ereturns, using the -estadd- component of Ben Jann's -estout- package from SSC:

sysuse auto,clear
reg price mpg weight turn
sca r2_a = e(r2_a)
sca rmse = e(rmse)
margins, eyex(_all) post
estadd sca r2adj = r2_a
estadd sca rmse = rmse
esttab, stat(N r2adj rmse)


Kit Baum   |   Boston College Economics & DIW Berlin   |
                             An Introduction to Stata Programming  |
  An Introduction to Modern Econometrics Using Stata  |

On Aug 29, 2012, at 10:22 AM, Alessandro Oliveira wrote:

> Hi Chris,
> I have doubts on the "margins" command of Stata.
> 1) Does the old mfx command generate bad results in Stata 12?
> 2) After a regression, using:
> margins, eyex(_all) post
> esttab
> does not return the adjusted R2. Do you have any hint on how to accomplish that?
> Regards,
> Alessandro

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index