# Categorical variables and interaction in MLR

#### Myron Tsisinskiy

##### New Member
Would it be correct, to add in multiple linear regrression interaction between two categorical variables (i transformed them - dummy variavles) with coding 0 and 1?

#### noetsi

##### Fortran must die
It depends on whether your theory supports doing so or not. Dummy variable interaction is not different than any other interaction.

#### Dason

Dummy variable interaction is not different than any other interaction.
It's a little bit easier to get your head around a dummy variable interaction than an interaction between continuous covariates though!

#### noetsi

##### Fortran must die
It's a little bit easier to get your head around a dummy variable interaction than an interaction between continuous covariates though!
True, but theoretically (I think) it's the same thing. Which is what I meant.

#### spunky

##### Doesn't actually exist
but as Jake corrected in a post of mine sometime earlier, the interpretation of dummy-coded interactions can be pretty confusing. effects coding is what i think people usually go for when they're dealing with interactions between categorical variables...

#### Dason

Is effects coding the {-1, 1} way of coding things?

Edit: And by that I mean it's either 0 or 1 for all groups except one group that is -1 for all of the dummy variables...

#### spunky

##### Doesn't actually exist
yep... that's how we know it in the social sciences.

how would you call it?

#### Dason

Meh - I don't really use that very often. But if I think about it when I learned it I think it was "factor effects coding" - so... yeah ... I guess effects coding makes sense.

#### noetsi

##### Fortran must die
Strange I always use reference coding...although the only thing I usually care about an interaction variable is if its sig or not. When it is I try to find out why it is substantively and look at graphs and run the regression at different levels of the interacting variables...

I am not sure what it matters if you use reference or effect coding if your doing that