3
$\begingroup$

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?

$\endgroup$
9
$\begingroup$

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.

| cite | improve this answer | |
$\endgroup$
1
$\begingroup$

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.)

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.