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: computing correct marginal effect in xtlogit model
From
Richard Williams <[email protected]>
To
[email protected], [email protected]
Subject
Re: st: computing correct marginal effect in xtlogit model
Date
Tue, 25 Oct 2011 17:19:02 -0500
At 04:03 PM 10/25/2011, ramesh wrote:
Hello,
I am using xtlogit model with an interaction term (e.g., y=
b0+b1.x1+b2.x1*x1+b3.x3). I want to compute the marginal effect of 'x1'.
However stata 'mfx compute, predict(pu0)' code treated 'x1' and 'x1*x1' as
two separate variables (in fact they are not) and gives two marginal effect
(marginal effect of 'x1', 'x1*x1'). I want to find the correct marginal
effect of variable 'x1'. Is there any way to to do this in stata?
Thanking in advance for your kind response!
Ramesh
If you have Stata 11 or higher, use the -margins- command. Assuming
x1 is continuous, The command will be something like
xtlogit y x1 c.x1#c.x1
followed by the margins command. If you aren't familiar with margins,
my notes on this are at http://www.nd.edu/~rwilliam/xsoc73994/Margins01.pdf .
-------------------------------------------
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/