Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Understanding Factor variables - is order significant ?

From   "Michael N. Mitchell" <>
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      -
A Visual Guide to Stata Graphics -
Stata tidbit of the week         -

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, 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: Richard.A.Williams.5@ND.Edu

* For searches and help try:
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index