Statalist


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

RE: st: dprobit/nocons/mfx question


From   "Schaffer, Mark E" <[email protected]>
To   <[email protected]>
Subject   RE: st: dprobit/nocons/mfx question
Date   Fri, 20 Mar 2009 14:34:50 -0000

Some off-list discussion with Kit Baum reveals a very compelling reason
for retaining -dprobit- as a documented command:  it is *much* faster
than -mfx-.

An example with the toy auto dataset is below.  -dprobit- is 30x faster.
I'm using IC Stata 10.1 and a nothing-special wintel desktop machine.

Kit made a very good point, which is that this suggests there is a good
case for asking StataCorp to tweak -mfx- so that it spots it is dealing
with -probit- and can do whatever it is that -dprobit- does to get the
marginal effects so much faster.

--Mark

. sysuse auto
(1978 Automobile Data)

. 
. timer clear

. timer on 1

. forvalues i=1/100 {
  2.         qui dprobit foreign weight turn trunk mpg
  3. }

. timer off 1

. timer list
   1:      0.61 /        1 =       0.6100

. 
. timer on 2

. forvalues i=1/100 {
  2.         qui probit foreign weight turn trunk mpg
  3.         qui mfx
  4. }

. timer off 2

. timer list
   1:      0.61 /        1 =       0.6100
   2:     19.45 /        1 =      19.4530


> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Maarten buis
> Sent: Friday, March 20, 2009 9:01 AM
> To: [email protected]
> Subject: Re: st: dprobit/nocons/mfx question
> 
> 
> --- On Thu, 19/3/09, Martin Weiss wrote:
> > How strong a case is there for the continued existence of
> > -dprobit-? Somehow, it creates more problems than it
> > solves...
> 
> The case for keeping -dprobit- is a case for backward 
> compatability, which is one of the strong points of Stata.
> To maintain backward compatability, you should be very 
> careful about dropping a command. Basicly you should only
> do so if it gives truely wrong results, and that is not the
> case with -dprobit-. An altarnative to dropping the command
> would be to depreciate it to an undocumented command (see: 
> -help undocumented-). That may not be a bad idea, but than
> again, I usually use -logit- rather than -probit- so I 
> wouldn't notice anyhow.
> 
> -- Maarten
> 
> -----------------------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
> 
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
> 
> 
> 
> 
>       
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 


-- 
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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