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

Re: st: dprobit/nocons/mfx question

From   Austin Nichols <>
Subject   Re: st: dprobit/nocons/mfx question
Date   Sat, 21 Mar 2009 17:59:58 -0400

Mark (Fellow of the Royal Society of Edinburgh! congrats!)--

I don't recommend using -dprobit- or -mfx- for this kind of problem.
Their answers to any substantive question will often be very wrong in
this kind of setting.  In fact, I think both -dprobit- and -mfx-
should exit with an error immediately if specified with (or after) the
-nocons- option, as that usually indicates someone is including a set
of exhaustive mutually exclusive dummies, for which marginal effects
cannot be sensibly calculated using the -mfx- approach (the -force-
option could still force the command to continue even after an error
message is issued).  Let's adopt the -mfx- language of "marginal
effects" for dummies, as distasteful as it is to mix derivatives and
discrete differences under the same moniker.

In general, the marginal effects of the two exhaustive mutually
exclusive dummies in your example should be the negative of each
other.  Note that the predicted probability of y given f==1 is .2273,
the predicted probability of y given f==0 is .5769, regardless of
which probit command you use, or using the column proportions from the
-tabulate- call below.  In this case, we would call the marginal
effect of f a reduction of 0.3497 in the predicted probability of y
when f==1, relative to the case where f==0.  Likewise, we would call
the marginal effect of d an increase of  0.3497 in the predicted
probability of y, relative to the case where d==0 (f==1).   Note that
-mfx- gets the right answer in this case after a probit with only one
dummy, but fails to perform well with -nocons-.  -mfx- will usually be
further from the right answer with more covariates included (because
predictions will be made at the mean of the covariates rather than at
each sample value; see also, but that is
a difference of method (not an outright mistake).

Another view of marginal effects might be to compare the case where f
is known to be 1 to the case where its value is unknown, so we take
the predicted probability over the whole sample, and compute the
marginal effect of f as .22727-.47297 = -.2457 and the marginal effect
of d as .57692-.47297 = .1040 (the difference of these two effects
gives the same answer as above).  Even if this view is appealing, note
that -mfx- after -probit y f d, nocons- does not return this
answer--it adopts the view that the marginal effect is
normal(_b[f]+.7*_b[d])-normal(.7*_b[d]) which does not make a lot of
sense--the question for that answer is: "what would be the effect on
the predicted probability of making a domestic car foreign,
conditional on it being 70% domestic when it is domestic, and 70%
domestic when it is foreign?" (a silly question IMHO).

I think -margeff- (see also also
reports the wrong answers with exhaustive mutually exclusive dummies
and the -nocons- option, but at least you can extract the right answer
with a modicum of algebra:

cap net inst margeff, from(
sysuse auto, clear
ren foreign f
gen d=1-f
gen y=(mpg<20)
ta y f, col
probit y f d, nocons nolog
mat mfx=e(Xmfx_dydx)
loc mfx=mfx[1,1]-mfx[1,2]
margeff, dummies(f d) replace
mat b=e(b)
loc mar=b[1,1]-b[1,2]
probit y f, nolog
margeff, dummies(f d)
di "Above -mfx- said " `mfx' ", -margeff- said " `mar'
qui {
replace f=1
predict double p1
replace f=0
predict double p0
su p0, meanonly
loc p0=r(mean)
su p1, meanonly
loc p1=r(mean)
di "Marginal effect of f is " `p1'-`p0'

On Thu, Mar 19, 2009 at 3:21 PM, Schaffer, Mark E <> wrote:
> Hi folks.
> Does anyone know why -dprobit- doesn't allow -nocons-?
> What makes this a curious limitation is that -mfx- following -probit-
> has no problem with -nocons-.
*   For searches and help try:

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