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   Richard Williams <>
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, 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:

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