Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: difference between interaction created with # and created with xi3

From   "Michael N. Mitchell" <>
Subject   Re: st: difference between interaction created with # and created with xi3
Date   Mon, 23 Aug 2010 15:14:13 -0700

Dear Uso

  The short answer to your question is that this xi3: command...

xi3: regress y i.a*i.b*i.c

  is the equivalent of

regress y i.a##i.b##i.c

  which is the equivalent of

regress y i.a i.b i.c ///
          i.a#i.b i.a#i.c i.b#i.c ///

  On the other hand, specifying

regress y i.a#i.b#i.c

yields a model that only specifies the interactions (no main effects, no two way interactions), which is not what we generally desire. I hope it suffices to say that this is not a particularly interesting model, and is complicated to explain via email.

I hope that helps,

Best regards,

Michael N. Mitchell
Data Management Using Stata      -
A Visual Guide to Stata Graphics -
Stata tidbit of the week         -

On 2010-08-23 12.49 PM, uso stata wrote:
Hello statlist,
I am currently using a linear model specification and I am fiddling
with interactions.

I have three BINARY regressors a b c

When I use the command a#b#c stata spits out 7 interactions:

a b c
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

when I use xi3: and a*b*c I get:

While the main effects are identical, i.e. the coefficient of "0 0 1"
is the same as the coefficient of "c", the interaction terms are all


The xi3 methods generates the same coefficient as the a##b##c method,
that is equivalent to i.a i.b i.c a#b#c

So my question is what is the specification that stata creates for
a#b#c? How do I interpret for example "0 1 1", I thought it was the
same as the interaction of b and c, but it seems not.
*   For searches and help try:
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index