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

From |
"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: dprobit/nocons/mfx question |

Date |
Sun, 22 Mar 2009 17:49:31 -0000 |

Thanks, Austin, that's very clear and really helpful. I already half-suspected that I was in the Land of Dubious Practice when I realized that -mfx- would happily report marginal effects evaluated where the two exhausive mutually exclusive dummies were both set to zero (!). Now I see why. Time to head for civilization. Cheers, Mark > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu > [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of > Austin Nichols > Sent: 21 March 2009 22:00 > To: statalist@hsphsun2.harvard.edu > Subject: Re: st: dprobit/nocons/mfx question > > 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 > http://gelbach.eller.arizona.edu/~gelbach/ado/margfx.pdf), 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 > http://www.stata-journal.com/sjpdf.html?articlenum=st0086) 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(http://web.uni-corvinus.hu/bartus/stata) > sysuse auto, clear > ren foreign f > gen d=1-f > gen y=(mpg<20) > ta y f, col > probit y f d, nocons nolog > mfx > 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 > mfx > 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 > <M.E.Schaffer@hw.ac.uk> 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: > * 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/

**References**:**st: dprobit/nocons/mfx question***From:*"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>

**Re: st: dprobit/nocons/mfx question***From:*Austin Nichols <austinnichols@gmail.com>

- Prev by Date:
**RE: st: RE: Group building according to given report dates and company** - Next by Date:
**Re: RE: st: RE: Group building according to given report dates and company** - Previous by thread:
**Re: st: dprobit/nocons/mfx question** - Next by thread:
**re: st: dprobit/nocons/mfx question** - Index(es):

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