1
$\begingroup$

Can correlation coefficient and regression slope have different signs in case of absence of multicollinearity among independent variables?

$\endgroup$
1

1 Answer 1

0
$\begingroup$

I think this will boil down to what kind of regression you're doing. You can come up with polynomial regressions that would violate that statement.

set.seed(999)
x1 <- -(1:100)/100 + rnorm(100)
cor(x1, y)
lm(y~ x1)
lm(y~ I(x1*x1))

output:

>     cor(x1, y)
[1] -0.1665058
>     lm(y~ x1)

Call:
  lm(formula = y ~ x1)

Coefficients:
  (Intercept)           x1  
47.38        -5.10  

>     lm(y~ I(x1*x1))

Call:
  lm(formula = y ~ I(x1 * x1))

Coefficients:
  (Intercept)   I(x1 * x1)  
48.895        1.271 

If we restrict our regression models, in the simple linear regression the statement is correct, since in our model $y = \alpha + \beta x$, we have our estimation for $\hat{\beta}$ being $r_xy \frac{s_y}{s_x}$. Where $r_xy$ is the correlation and $s_y, s_x$ is the standard deviation of $x, y$ respectively. Since $s_y, s_x > 0$ then it must have the same sign as the correlation measure.

However, this is not true once we move out of simple linear regression.

When you add extra variables you may suffer from Simpson's paradox. Which is when there may be confounding effects between variables. So even though variables may appear to have positive correlation towards one another, they may actually be negatively correlated.

Let's now suppose we take care of confounding. You may still end up in situations like the R code below:

set.seed(999)

x1 <- -(1:100)/100 + rnorm(100)
x2 <- 1:100 + rnorm(100)
y <- 1:100

cor(x1, y)
cor(x2, y)
lm(y~ x1 + x2)

output:

> cor(x1, y)
[1] -0.1665058
> cor(x2, y)
[1] 0.9995317
> lm(y~ x1 + x2)

Call:
  lm(formula = y ~ x1 + x2)

Coefficients:
  (Intercept)           x1           x2  
0.3602       0.2738       0.9975  

So we can conclude that with the exception of simple linear regression, we cannot guarantee that correlation coefficient and regression slope will always have the same sign.

$\endgroup$

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