# No intercept model with more than one factor

I am using SAS for linear regression with two independent categorical variables. When I run models with each categorical variable separately, I get estimates for every level of both variables. This makes sense since I have no intercept to act as the reference. However, when I put both categorical variables in the same model, I am not getting an estimate for one level of one of the categorical variables. I believe I should get estimates for every level of both categorical variables since there is no intercept to act as a reference. Do categorical variables need to be parameterized differently in a no intercept model with multiple categorical variables?

• Note that the issue here really doesn't relate to SAS; it's a mathematical issue. I will change your title to be more general Oct 18 '17 at 4:03

The "omit the intercept to get estimates for each level" thing only works with one factor.

By having all the levels of the first factor you have (in effect) an intercept in there (the sum of the 0-1 dummies for that first factor is all ones), which means you must leave out one df from any further factors in the model just as if you had an explicit intercept.

As soon as you have all levels of two factors, you will have perfect multicollinearity (the sum of the dummies for the first factor is identical to the sum of the dummies on the second factor).

e.g. consider two factors, $g$ (3 levels) and $t$ (2 levels). The 6 possible factor combinations are:

  t1   t2       g1  g2  g3
1    0        1   0   0
1    0        0   1   0
1    0        0   0   1
0    1        1   0   0
0    1        0   1   0
0    1        0   0   1


Now to see there's perfect multicollinearity there, we just compute the sum for each factor: T = t1+t2 and G= g1+g2+g3

  t1   t2  T     g1  g2  g3  G
1    0   1     1   0   0   1
1    0   1     0   1   0   1
1    0   1     0   0   1   1
0    1   1     1   0   0   1
0    1   1     0   1   0   1
0    1   1     0   0   1   1


... and we see that T=G, which shows that we have perfect multicollinearity.