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: Understanding Factor variables - is order significant ?
From
Richard Williams <[email protected]>
To
[email protected]
Subject
Re: st: Understanding Factor variables - is order significant ?
Date
Wed, 26 May 2010 00:22:22 -0400
This is a perplexing state of affairs! I don't know how to explain this!
I hope someone can help explain!
Michael, I am relieved that someone else is confused! Tweaking your
code a bit,
use http://www.ats.ucla.edu/stat/stata/dae/poissonreg, clear
gen himath = math > 50
poisson daysabs himath#male, nolog
poisson daysabs ib0.male#ib1.himath, nolog
poisson daysabs ib1.himath#ib0.male, nolog
poisson daysabs ib0.male##ib1.himath, nolog
poisson daysabs ib1.himath##ib0.male, nolog
The first 2 models give the correct result -- LR Chi-square =
202.49. The 3rd gives the incorrect result of LR chi-square =
144.99. The last 2 commands, using ## instead of #, also give the
correct results.
In the few examples we've tried where we knew the correct answer, it
looks like interactions of the form b0.x1#b1.x2 worked fine but
b1.x2#b0.x1 caused problems. Further, plain old regress seems to
work fine regardless of how you do the interactions but ml techniques
like poisson and ologit have problems.
I strongly suspect there is some sort of bug here. But if not, maybe
we'll get a fascinating explanation that will greatly add to our
understanding of interaction effects!
-------------------------------------------
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/