Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: margeff/margins discrepancy


From   "Joao Ricardo F. Lima" <[email protected]>
To   [email protected]
Subject   Re: st: margeff/margins discrepancy
Date   Mon, 26 Apr 2010 20:27:25 -0300

Dear Richard and Statalister,

use -margeff, at(mean) replace-

************begin example***********
sysuse nlsw88.dta, clear
probit married wage if age==45
margeff, at(mean) replace
margins, dydx(wage)
*************end example**********

. margeff, at(mean) replace

Partial effects at fixed values after margeff
      y  = Pr(married)

------------------------------------------------------------------------------
    variable |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        wage |  -.0071581   .0151697    -0.47   0.637    -.0368903     .022574
------------------------------------------------------------------------------

. margins, dydx(wage)
Warning: cannot perform check for estimable functions.

Average marginal effects                          Number of obs   =         78

Expression   : Linear prediction, predict()
dy/dx w.r.t. : wage

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        wage |  -.0071581   .0151697    -0.47   0.637    -.0368903     .022574
------------------------------------------------------------------------------


. which margeff
c:\ado\plus\m\margeff.ado
*! Obtain partial effects after estimation
*! Version 2.2.0  (20 August 2009)    (Revision of Stata Journal submission)
*! Author:        Tamas Bartus        (Corvinus University, Budapest)

.
. update query
(contacting http://www.stata.com)

Stata executable
    folder:               C:\Arquivos de programas\Stata11\
    name of file:         StataSE.exe
    currently installed:  20 Apr 2010
    latest available:     20 Apr 2010

Ado-file updates
    folder:               C:\Arquivos de programas\Stata11\ado\updates\
    names of files:       (various)
    currently installed:  20 Apr 2010
    latest available:     20 Apr 2010

Utilities updates
    folder:               C:\Arquivos de programas\Stata11\utilities
    names of files:       (various)
    currently installed:  11 Feb 2010
    latest available:     11 Feb 2010

Recommendation
    Do nothing; all files up to date.

HTH,

Joao Lima

2010/4/26 Michael Norman Mitchell <[email protected]>:
> Dear Richard
>
>  Indeed, I am using a different version of -margeff- than you are. I am
> using this version from
>
> http://www.stata-journal.com/software/sj5-3/
> Stata Journal volume 5, issue 3
>
> and here is the -which- information
>
> . which margeff
> c:\ado\plus\m\margeff.ado
> *! Marginal effects for categorical dependent variable models
> *! This version: 22 April 2005 (Stata Journal submission)
> *! Author: Tamas Bartus (Corvinus University Budapest)
>
>  I don't know if that helps to solve this, but there it is :)
>
> Best regards,
>
> Michael N. Mitchell
> See the Stata tidbit of the week at...
> http://www.MichaelNormanMitchell.com
>
> On 2010-04-25 8.47 PM, Richard Williams wrote:
>>
>> At 09:14 PM 4/25/2010, Michael Mitchell wrote:
>>>
>>> Greetings
>>>
>>>  Hmmm... ran your code and I get the same coefficient and se from
>>> -margeff- and -margins- using Stata 11, see below
>>
>> ...
>>
>>>  Did I do something wrong not to get different results?
>>
>> It is not often that we get questions like this -- "Did I do something
>> wrong that caused me to get the correct results?"   :)
>>
>> Personally, I get different results from the two programs, margeff and
>> margins.  Why you get it right, I don't know.  Are you using the same
>> versions of Stata and margeff as everyone else?  If so, is there any chance
>> that at some point you patched your margeff and have since forgotten about
>> it?  Here is what I get.
>>
>> . which margeff
>> c:\ado\plus\m\margeff.ado
>> *! Obtain partial effects after estimation
>> *! Version 2.2.0  (20 August 2009)    (Revision of Stata Journal
>> submission)
>> *! Author:        Tamas Bartus        (Corvinus University, Budapest)
>>
>> . update query
>> (contacting http://www.stata.com)
>>
>> Stata executable
>>    folder:               C:\Program Files\Stata11\
>>    name of file:         StataSE.exe
>>    currently installed:  20 Apr 2010
>>    latest available:     20 Apr 2010
>>
>> Ado-file updates
>>    folder:               C:\Program Files\Stata11\ado\updates\
>>    names of files:       (various)
>>    currently installed:  20 Apr 2010
>>    latest available:     20 Apr 2010
>>
>> Utilities updates
>>    folder:               C:\Program Files\Stata11\utilities
>>    names of files:       (various)
>>    currently installed:  11 Feb 2010
>>    latest available:     11 Feb 2010
>>
>> Recommendation
>>    Do nothing; all files up to date.
>>
>>
>>
>> -------------------------------------------
>> Richard Williams, Notre Dame Dept of Sociology
>> OFFICE: (574)631-6668, (574)631-6463
>> HOME:   (574)289-5227
>> EMAIL:  [email protected]
>> WWW:    http://www.nd.edu/~rwilliam
>>
>> *
>> *   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:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>



-- 
----------------------------------------
Joao Ricardo Lima, D.Sc.
Professor
UFPB-CCA-DCFS
Fone: +5538387264913
Skype: joao_ricardo_lima
----------------------------------------

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