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/