13

Is it possible to obtain a positive correlation between a regressor and a response (+0,43) and, after that, obtain a negative coefficient in the fitted regression model for this regressor?

I'm not talking about changes in the sign of the regressor among some models. The coefficient sign always remains.

Could the remaining variables of the fitted model influence the changing of the sign?

Scortchi - Reinstate Monica
  • 27,560
  • 8
  • 81
  • 248
Javier Bermejo
  • 211
  • 1
  • 2
  • 4
  • 3
    You will find a similar question and answers here : http://stats.stackexchange.com/questions/33888/x-and-y-are-not-correlated-but-x-is-significant-predictor-of-y-in-multiple-regr/33897#33897 – JDav Aug 11 '12 at 22:48

2 Answers2

16

Both @Henry, and @JDav are pointing you in the right direction (+1 to each). However, I'm very visual and it helps me if I can see how this works. In that respect, here's a quick plot in which the first variable is confounded with group membership. If the groups are ignored, the correlation coefficient is positive (as can be seen in the figure), but in a multiple regression, $\beta_{x1}=-1$, albeit with different intercepts for the three groups. enter image description here
As further food for thought, when all variables are categorical (instead of continuous as in this case) the phenomenon of reversing the apparent relationship upon inclusion of other variables is known as Simpson's paradox. Since it's ultimately quite similar, it may help to read about that as well. It is discussed on CV here.

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
  • 1
    FWIW, I have a fuller treatment of essentially the same issue here: [Is there a difference between 'controlling for' and 'ignoring' other variables in multiple regression?](http://stats.stackexchange.com/questions/78828//78830#78830) – gung - Reinstate Monica Feb 03 '14 at 23:51
11

If the positively-correlated regressor is the only regressor in a linear model then its coefficient should be positive.

If there are several regressors and they are not independent then you can see the effect you are asking about. Read about confounding for some explanation

Henry
  • 30,848
  • 1
  • 63
  • 107