Skip to main content
1 of 2

This happens very often when your "weaker" variable is correlated with your "stronger" variable and also correlated with the residual of the dependent when regressed with your "stronger" variable and the two relationships are opposite. Hence, if you regress the dependent with the "weaker" variable alone, you may even get a significant coefficient, due to omitted variable bias (i.e. due to the weaker variable's correlation with the stronger one which is not included). However, when you then include the "strong" variable, the omitted variable bias disappears and the variables get the right signs.

Thus, I do not agree that $x_1,x_2$ need to be anywhere near fully co-linear for this to happen. They have to be correlated though. Here is an example in python:

enter image description here

enter image description here

As you can see the correlation between $x_1,x_2$ is not dramatically high and still we see that if we only include $x_2$ it gets a significantly positive coefficient, due to omitted variable bias, but once we include $x_1$ in the model, both variables' coefficients converge to their true values.

I believe that if you combine my example with the one posted below, you see a healthy and an unhealthy situation where this can happen. If you notice on the example posted by the user below, the coefficients go crazy when both variables are included and even though it is not printed, it is certain that the $R^2$ will be unaffected by the inclusion of the 2nd variable, which is in contrast with my example. Hence, I think that you can check which of the two examples your problem resembles and decide accordingly on whether your $x_1$ is useful in informatively adjusting the the influence $x_2$, like $x_2$ does for $x_1$ in my case or whether you have an artifact caused by high levels of multicolinearity, as the example of the user below.