Statalist The Stata Listserver


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

st: St: I am using a model with interactions. How can I obtain marginal effects


From   =?gb2312?B?0+Ag0evR6w==?= <[email protected]>
To   [email protected]
Subject   st: St: I am using a model with interactions. How can I obtain marginal effects
Date   Sat, 11 Feb 2006 21:39:43 +0800

hello:
According to the http://www.stata.com/support/faqs/stat/mfx_interact.html,the author tells me how to obtain marginal effects and their standard errors. So I program, the code is following:
(Note: h is the dependent variable , pcinc ratio1 ii1 is the independent variable ,furthermore , ii1 is the interaction term.)
probit h pcinc ratio1 ii1
quietly summarize pcinc if e(sample)
local meanpcinc = r(mean)
quietly summarize ratio1 if e(sample)
local meanratio1= r(mean)
local xb _b[pcinc]*`meanpcinc '+_b[ratio1]*`meanratio1 '+_b[ii1] *`meanpcinc '*`meanratio1 '+_b[_cons]

(The above step is ok in stata)

predictnl dydt= normalden(`xb')*(_b[pcinc]+_b[ii1]*`meanratio1')in 1 ,se(sep)

��invalid syntax�� appears in stata. I don��t know what��s wrong with this step .so could you help me to solve this problem. Look forward to your reply ,

_________________________________________________________________
������� MSN Explorer: http://explorer.msn.com/lccn
*
* 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index