--- "Tamas Bartus (tbartus)" <[email protected]> wrote:
> There is another difference between mfx and margeff: for continuous
> variabels, the former calculates marginal change, the latter discrete
> change. The unit of the discrete change is the unit of measurement of
> the variable.
Ah, I did not see that (I was still used to old -margeff-, which
computed the average marginal effect). I can now exactly reproduce the
results of -margeff-:
*----------------------- begin example -----------------------------
sysuse auto, clear
logit foreign mpg length
predict double xb if e(sample), xb
gen double mfx_mpg = (invlogit(xb + _b[mpg]) - ///
invlogit(xb - _b[mpg])) / 2
gen double mfx_length = (invlogit(xb + _b[length]) - ///
invlogit(xb - _b[length])) / 2
sum mfx*
margeff
*------------------------ end example -----------------------------
(For more on how to use examples I sent to the Statalist, see
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )
It might be an idea to add an option for average marginal effects. I
believe some economists are pretty fond of average marginal effects
(though, in the example in my previous post in this thread, the two
happened to be the same up to 4 digits...)
Thanks,
Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
___________________________________________________________
Support the World Aids Awareness campaign this month with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/