Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: margeff/margins discrepancy


From   "Joanne W. Hsu" <jwhsu@umich.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: margeff/margins discrepancy
Date   Sun, 25 Apr 2010 09:57:22 -0400

Here is a replicable example:

sysuse nlsw88.dta, clear
probit married wage if age==45
margeff
margins, dydx(wage)

Here, margeff produces a standard error of .0149933 (z statistic of -0.48) whereas margins reports 0.0150751 (z statistic -0.47). Margeff reports the same coefficients and standard errors regardless of whether version 9: probit is run or just probit.

Now, if one runs the following after the probit:

keep if e(sample)==1
margeff

margeff now produces the same output as margins did.

Note that while these standard error differences are relatively small, I'm getting a similar discrepancy that is much larger in my own data (standard errors on an order of 3 times larger with margins than margeff).

Any ideas on what's going on here?

Date: Sat, 24 Apr 2010 18:40:44 -0500
From: Richard Williams<Williams.NDA@comcast.net>
Subject: Re: st: margeff/margins discrepancy

A replicable example, or at least seeing your code, could help.  In
particular, you want to be sure that the margins command really is
doing the same thing as margeff.

I have found that in some instances using version control on the
estimation command is helpful with margeff, e.g.

version 9: probit y x
margeff

This is because margeff was written for Stata 9, and some of the
ereturned results from estimation commands changed in Stata 10 or 11.

If that doesn't solve it why don't you post your code, or better yet
a replicable example.


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index