Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Doubt with Margeff


From   "Joao Ricardo F. Lima" <jricardofl@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Doubt with Margeff
Date   Tue, 29 Apr 2008 13:16:05 -0300

Dear Prof. Tamas and Statalisters,

I'm with this doubt using margeff after logit model. x22 is the square of x2...

Doing:

* Margeff x2

qui logit y x1 x2 x22 lnx3, nolog
qui margeff, at(mean) dummies(x1) replace
qui su x2
local mx2 = r(mean)   // mean of x2
lincom _b[x2]+ 2*`mx2'*_b[x22]

I have this result:

. lincom _b[x2]+ 2*`mx2'*_b[x22]

 ( 1)  x2 + 82.66667 x22 = 0

------------------------------------------------------------------------------
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .0013582   .0103425     0.13   0.896    -.0189128    .0216292
------------------------------------------------------------------------------


But doing this:

qui logit y x1 x2 x22 lnx3, nolog
qui prvalue
local pi=r(p1)
qui sum x2
local m1=r(mean)
di (`pi'*(1-`pi'))*(_b[x2]+(2*`m1'*_b[x22]))

I have

. di (`pi'*(1-`pi'))*(_b[x2]+(2*`m1'*_b[x22]))
.0033248

For lnx3, the values are the same, itīs ok!

nlcom _b[lnx3]*(1/`m2')

       _nl_1:  _b[lnx3]*(1/11.83333333333333)

------------------------------------------------------------------------------
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       _nl_1 |   .1195907   .0650132     1.84   0.066    -.0078329    .2470143
------------------------------------------------------------------------------

. di (`pi'*(1-`pi'))*(_b[lnx3]*(1/`m2'))
.11959073


Could you help me again?

Thanks!!

Joao Ricardo Lima
-- 
-------------------------------
Joao Ricardo Lima
Professor
UFPB-CCA-DCFS
+553138923914
-------------------------------

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index