0

I have three columns of data, Y, X1, X2 and I want to do single and multi regression on them. For single regression the result is fine:

REG(Y, X1)  ==>  ŷ = -0.87027X - 0
REG(Y, X2)  ==>  ŷ = 0.30389X - 0.0003

enter image description here

enter image description here

As you can see for X1, the coefficient is negative while for X2, the coefficient is positive and they are meaningful in my work. However, when I perform a multi-regression calculation, I see a different thing.

REG(Y, X1, X2)  ==>   ŷ = -0.99349X1 - 0.22949X2 + 0.00022

As you can see both coefficients are negative.

I was wondering what does that mean exactly as I expected to see both negative and positive coefficients.

I also plotted REG(Y,X1,X2) which can be seen below. Note that for a better plot, I did this renaming:

Y -> z-axis

X1 -> x-axis

X2 -> y-axis

enter image description here enter image description here

As you can see, when X2 (y-axis) increases, Y (z-axis) decreases. This is not true in the case of REG(Y,X2). Any thoughts on that?

mahmood
  • 223
  • Hi: when you run the multiple regression, what you are essentially doing is fitting a plane to the data. In the simple regressions, you are fitting lines to the data. So, probably, the only way to see why the result is the result is to construct a 3-D plot of the multiple regression results : Y-dependent versus plane. – mark leeds Mar 29 '23 at 11:08
  • Hi: is your statement above regarding, REG(Y, X1, X2) independent of the value of X1 ? If shouldn't be. Also, it would be helpful if you could include the 3D plot. – mark leeds Mar 29 '23 at 11:38

1 Answers1

1

It means that there is a negative correlation between $x_1$ and $x_2$, such that even though the effect of $x_2$ on $y$ in itself is negative, if you don't control for $x_1$, the effect comes out positive, because it is outweighed by the confounding factor of high $x_2$ being associated with low $x_1$ which has a positive effect on $y$. That's assuming there isn't some other problem with the regression.

Zoe Allen
  • 4,380
  • I missed one figure while editing the post. In fact the effect of X2 on Y is positive. – mahmood Mar 29 '23 at 12:21
  • @mahmood that's not the usual interpretation of your multivariate regression. Maybe you have a reason to think this regression result is spurious, but without saying more about your data it's impossible for anyone else to judge. – Zoe Allen Mar 29 '23 at 12:49