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
"Michael N. Mitchell" <[email protected]>
To
[email protected]
Subject
Re: st: Understanding Factor variables - is order significant ?
Date
Tue, 25 May 2010 21:41:02 -0700
Dear Richard
That is an excellent summary, and I agree completely. Thanks for patiently walking me
through this! I hope others have enjoyed this :) .
Michael N. Mitchell
Data Management Using Stata - http://www.stata.com/bookstore/dmus.html
A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
Stata tidbit of the week - http://www.MichaelNormanMitchell.com
On 2010-05-25 9.22 PM, Richard Williams wrote:
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/
*
* 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/