Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: predictnl for effects and se of interaction terms in probit model


From   "shuang zhang" <[email protected]>
To   [email protected]
Subject   RE: st: RE: predictnl for effects and se of interaction terms in probit model
Date   Sat, 03 Dec 2005 02:44:51 +0000

Dear Maarten,

Thanks for you kindly reply!
Actually, I have read the websits you gave to me, and I really writing my command like that. I have tried and failed. Can you give me some suggestions?

Interaction terms in my probit model are n1*m, t1*m, n1*m, n2*m
My command to estimate the interaction term as following:

probit poverty0 n1 t1 n2 t2 m n1m t1m n2m t2m
qui sum n1 if e(sample)
local meann1=r(mean)
qui sum t1 if e(sample)
local meant1=r(mean)
qui sum n2 if e(sample)
local meann2=r(mean)
qui sum t2 if e(sample)
local meant2=r(mean)
qui sum market if e(sample)
local meanm=r(mean)
local xb _b[n1]*`meann1' + _b[t1]*`meant1'+ _b[n2]*`meann2'+ _b[t2]*`meant2'+ _b[n1m]*`meann1'*`meanm'+_b[t1m]*`meant1'*`meanm'+_b[n2m]*`meann2'*`meanm'+_b[t2m]*`meant2'*`meanm'_b[m]*`meanm'+ _b[_cons]
predictnl dydn1m=normden(`xb')*(-(`xb'))*(_b[n1]+_b[n1m]*`meanm')*(_b[m]+ _b[n1m]*`meanm'+_b[n2m]*`meanm'+_b[t1m]*`meanm'+_b[t2m]*`meanm')+ normden(`xb')*( _b[n1m]) in 1, se(sen1m)

But STATA report that the expression of last command"predictnl" is too long. So, I can't get results.
I drop one interaction term in my model, and I can run the command above very well and get results. So, I am rather confused why the expression is too long.

Thanks very much!


Cheers,
Zhang Shuang




From: "Maarten Buis" <[email protected]>
Reply-To: [email protected]
To: <[email protected]>
Subject: st: RE: predictnl for effects and se of interaction terms in probit model
Date: Fri, 2 Dec 2005 17:15:03 +0100

Dear Zhang Shuang:

I cannot correct your command since you have not given it to us, or the exact error message. But calculating marginal effects with interaction terms is a FAQ: see: http://www.stata.com/support/faqs/stat/mfx_interact.html and threads started with http://newwww.stata.com/statalist/archive/2004-11/msg00254.html and http://www.stata.com/statalist/archive/2004-11/msg00346.html . These contain lots of example code that might help.

HTH,
Maarten


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of shuang zhang
Sent: vrijdag 2 december 2005 17:04
To: [email protected]
Subject: st: predictnl for effects and se of interaction terms in probit model

Hi,

In my probit model, I have independent variables X1,X2,X3,X4,M, and the
interaction terms X1*M, X2*M, X3*M, X4*M. I want to estimate the marginal
effects of these variables, especially that of interaction terms. I know the
command "predictnl" may help me to get right marginal effect and se.
However, when I do the command with all these variables above, I meet
problems.
1, I can get marginal effect and se of X1,X2,X3,X4,M by "predictnl".
2, When I want to estimate the interaction terms and write the command for
them, the STATA report that my expression of "predictnl" is too long!
3, For a check, I use just X1,X2,X3,M and X1*M, X2*M, X3*M, which including
three interaction terms. I can get the marginal effect and se of interaction
terms by "predictnl". But I can't get results when I add X4 and have four
interaction terms, where STATA told me my expression was too long.

I am rather confused by "predictnl". I am sure my command writtened
correctly, but it can't work when I have four interaction terms!
Any advice on this problem is welcome!

Thanks very much!


Cheers,
Zhang Shuang

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement

*
* 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/

*
* 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/
_________________________________________________________________
Don�t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/

*
* 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