Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: margin vs mfx
Tirthankar Chakravarty <email@example.com>
Re: st: margin vs mfx
Fri, 23 Sep 2011 18:28:03 -0700
-margins- wants you to explicitly declare factor variables as such
during estimation, else they are considered as continuous, whereas
-mfx- and -dprobit- gauge this from the possible values:
sysuse auto, clear
generate goodplus = rep78 >= 4 if rep78 < .
dprobit foreign mpg goodplus
probit foreign mpg goodplus
probit foreign mpg i.goodplus
margins, dydx(*) atmeans
On Fri, Sep 23, 2011 at 11:52 AM, Fernando Rios Avila
> Dear Stata listers,
> I was checking some of my old program files which im trying to update,
> and found one issue I hope someone can help me with.
> The problem is that When I run the old program -dprobit- the marginal
> results reported there are identical to the ones obtain using -mfx-
> after a probit model.
> However, when I apply the margin command, i cant obtain the same
> results. they are similar, but not the same.
> for instance see the following results:
> Here is an example of the differences im finding:
> sysuse auto
> help dprobit
> generate goodplus = rep78 >= 4 if rep78 < .
> dprobit foreign mpg goodplus
> Probit regression, reporting marginal effects Number of obs = 69
> LR chi2(2) = 30.92
> Prob > chi2 = 0.0000
> Log likelihood = -26.942114 Pseudo R2 = 0.3646
> foreign dF/dx Std. Err. z P>z x-bar [
> 95% C.I. ]
> mpg .0249187 .0110853 2.30 0.022 21.2899 .003192 .046646
> goodplus* .4740077 .1114816 3.81 0.000 .42029 .255508 .692508
> obs. P .3043478
> pred. P .2286624 (at x-bar)
> (*) dF/dx is for discrete change of dummy variable from 0 to 1
> z and P>z correspond to the test of the underlying coefficient being 0
> probit foreign mpg goodplus
> Marginal effects after probit
> y = Pr(foreign) (predict)
> = .22866238
> variable dy/dx Std. Err. z P>z [ 95% C.I. ] X
> mpg .0249187 .01109 2.25 0.025 .003192 .046646 21.2899
> goodplus* .4740077 .11148 4.25 0.000 .255508 .692508 .42029
> (*) dy/dx is for discrete change of dummy variable from 0 to 1
> margins, dydx(*) atmeans
> Conditional marginal effects Number of obs = 69
> Model VCE : OIM
> Expression : Pr(foreign), predict()
> dy/dx w.r.t. : mpg goodplus
> at : mpg = 21.28986 (mean)
> goodplus = .4202899 (mean)
> dy/dx Std. Err. z P>z [95% Conf. Interval]
> mpg .0249187 .0110854 2.25 0.025 .0031918 .0466455
> goodplus .46276 .1187437 3.90 0.000 .2300267 .6954933
> Is there anyway to obtain the same results?
> I know this must be an old issue, but cant seem to find references to this.
> Thanks in advance.
> * 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/
* For searches and help try: