3

I have a linear regression with two explanatory variables. One of them is a two level categorical variable. When I perform the fit, R tells me that the intercept is highly non significant. When I force the intercept to be zero in the regression, it tells me that the coefficient for the 0-level of the categorical variable is highly non significant. What should I do?

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
user20679
  • 131
  • 1
  • 3
  • 4
    You may find this thread of interest: [Removal of statistically significant intercept term boosts $R^2$ in linear model](http://stats.stackexchange.com/questions/26176/). – gung - Reinstate Monica Feb 10 '13 at 01:12

2 Answers2

9

The basic answer here is to not remove the intercept. Suppressing the intercept in a regression model is pretty much always a bad idea, and the 'significance' is largely irrelevant.

When you have a categorical explanatory variable, the standard approach is to use reference cell coding (commonly called 'dummy coding'). Under this scheme, you will have indicators for one fewer than the number of groups, but the intercept ends up taking account of that group. Thus, the intercept and the 0-level group are the same. (I discuss reference cell coding in more depth here, if you want more information.)

What these tests are telling you is that the mean of the 0-level condition cannot be differentiated from 0. However, this is very unlikely to be a piece of information that you should care about. In addition, it doesn't tell you anything about whether the 1-level and the 0-level differ, which presumably, you would care about. Either way, this is part of the model, so you should leave it in.

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
1

I suggest you don't remove the intercept. In this context it doesn't make much sense to do that (and generally doesn't; there are a few rare exceptions where you want a no-intercept model, but then $R^2$ doesn't mean what you might think it does.)

Glen_b
  • 257,508
  • 32
  • 553
  • 939