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, statalist.org is already up and running.

# Re: st: Interpreting interactions - what is the difference?

 From Maarten Buis To statalist@hsphsun2.harvard.edu Subject Re: st: Interpreting interactions - what is the difference? Date Fri, 8 Mar 2013 14:19:46 +0100

```On Fri, Mar 8, 2013 at 1:43 PM, Amal Khanolkar wrote:
> I have good reason to believe that I have an interaction effect on the association that I am investigating. I tested for an interaction as follows (the syntax that I am used to using):
>
>  xi: regress bvk i.ethnicity_bi2*i.smoke1 i.magecat <snip>

> -Suppose I wanted to change the baseline group for the covariate magecat (maternal age) to the third category, then I do so by running the following (without the xi prefix, and everything else remaining the same as the first regression above):
>
> . regress bvk i.ethnicity_bi2#i.smoke1 ib3.magecat  <snip>

> - I expected the second regression to be the same as the first, but it seems like the coefficients for the interaction terms 2_3, 2_4, 3_3, &  3_4 are however different. Could someone explain to me why they are different and if I should interpret the interaction terms from the two regression models differently.

The problem is that * in -xi- is ## in factor variable notation and
you used #. You are better off using -xi- or factor variable notation.
Since you are for some mysterious reason unwilling to let go of -xi:-,
you should just consistently stick to -xi:- and not use factor
variables, margins, or marginsplot. As you noticed, the differences
are subtle and it is just too easy to make mistakes when continously
switching between systems.

So if you wanted to set the baseline for i.magecat to 3 using the old
-xi:- sytem, than you first type -char magecat[omit] 3-, and then
estimate your -xi: regress- model. See: -help xi-

-- Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/
```