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: margins after mlogit interaction term
From
Richard Williams <[email protected]>
To
[email protected], [email protected]
Subject
Re: st: margins after mlogit interaction term
Date
Fri, 27 Jan 2012 11:28:54 -0500
At 11:19 AM 1/27/2012, Ida Hansen wrote:
I'm using Stata 12. I'm using margins after mlogit. I have an interaction
term in the model. I have read that the old mfx command gave incorrect
results for interaction effects, while the new margins command gives you no
results. However, I got results for the interaction terms (country*gender)
using margins after mlogit, and I suppose therefore that I have done
something wrong. How can I estimate correct interaction terms in
multinominal logistic regression?
Example for outcome 1:
tabulate country, generate(country)
generate interaction=women*country
xi:mlogit dependent women country1 country2 country3 interaction1
interaction2 interaction3, baseoutcome(0)
margins, dydx(women country1 country2 country3 interaction1 interaction2
interaction3)predict(outcome(1))
Maarten basically just answered this on a different thread. You have
to be using factor variable notation instead of computing the
interactions separately. Otherwise Stata doesn't know it is an
interaction. The code would be something like
mlogit dependent women i.country i.women#i.country
For more, see http://www.nd.edu/~rwilliam/stats/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/