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

re: st: dprobit/nocons/mfx question

From   Kit Baum <>
Subject   re: st: dprobit/nocons/mfx question
Date   Fri, 20 Mar 2009 11:47:10 -0400

Martin said

Could the benefits of faster marginal effects be made available to avid -logit- users such as Maarten via a, tentatively named -dlogit-? That would restore the symmetry in my view...

I don't like this idea. Presumably StataCorp designed a general- purpose marginal effects routine in order to avoid having a separate marginal-effects command for each and every command that might benefit from one. IMHO it would be a step backward to move in the latter direction. I agree that -mfx- ought to be able to calculate AMEs, as does the admirable -margeff- of Bartus, and I feel strongly that something needs be done about the lamentable speed penalty of -mfx-. But I imagine that StataCorp developers' time could be better spent working on that than creating special-purpose commands (a la official - dprobit- or unofficial -dtobit-) that sidesteps mfx. One very nice thing about -mfx- is that it leaves stuff behind in perfectly predictable places, no matter what estimation command preceded it. That makes it easier to work with its results downstream, incorporate them into tables, etc.

A cursory glance (viewsource mfx.ado) indicates that -mfx- does its work by preserving, dropping, and restoring the dataset. I suspect that is the cause of a bit performance hit; -dprobit- does not do that (although -margeff- does, if I'm not mistaken). My guess is that with judicious use of Mata code, that could be avoided and calculations sped up as well.

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

*   For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index