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

RE: st: dprobit/nocons/mfx question

From   "Nick Cox" <>
To   <>
Subject   RE: st: dprobit/nocons/mfx question
Date   Fri, 20 Mar 2009 14:52:27 -0000

The main idea here looks excellent. 

As elsewhere posted -dprobit- is neither documented nor undocumented,
which are categories of official commands, but a user-written command. 

On a totally different note, let me slip in here public congratulations
to Mark, who has recently been elected as a Fellow of the Royal Society
of Edinburgh: 


That website gives some details for flavour: 

"There have been many distinguished Fellows of the Society. Adam Smith
was a founder member in 1783 and since that time the Fellowship has
included Walter Scott (a past President), Joseph Black, James Hutton,
Charles Darwin, John Logie Baird, William Wordsworth, Niels Bohr,
Francis Crick, and Charlotte Auerbach amongst many others of note." 


Schaffer, Mark E

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.

. 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

Maarten buis
> --- 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.

*   For searches and help try:

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