Skip to main content
Notice removed Reward existing answer by Glen_b
Bounty Ended with Silverfish's answer chosen by Glen_b
Notice added Reward existing answer by Glen_b
Bounty Started worth 100 reputation by Glen_b
Tweeted twitter.com/#!/StackStats/status/644168682084663296
retitle
Source Link
Silverfish
  • 23.9k
  • 28
  • 105
  • 206

Misunderstanding of In multiple linear regression, why does a plot of predicted points not lie in a straight line?

I'm using multiple linear regression to describe relationships between Y and X1,X2. From

From theory I understood that multiple regression assumes linear relationships between Y and each of X (Y and X1, Y and X2). I'm not using any transformation of X. So

So, I got the model with R=0.45 and all significant X (P<0.05). Then I plotted Y against X1. I don't understand why red-colored circles that are predictions of the model do not form a line. As I said before, I expected that each pair of Y and X is fitted by a line.

enter image description here

The plot is generated in python this way:

fig, ax = plt.subplots()
plt.plot(x['var1'], ypred, 'o', validation['var1'], validation['y'], 'ro');
ax.set_title('blue: true,   red: OLS')
ax.set_xlabel('X')
ax.set_ylabel('Y')
plt.show()

Misunderstanding of multiple linear regression

I'm using multiple linear regression to describe relationships between Y and X1,X2. From theory I understood that multiple regression assumes linear relationships between Y and each of X (Y and X1, Y and X2). I'm not using any transformation of X. So, I got the model with R=0.45 and all significant X (P<0.05). Then I plotted Y against X1. I don't understand why red-colored circles that are predictions of the model do not form a line. As I said before, I expected that each pair of Y and X is fitted by a line.

enter image description here

The plot is generated in python this way:

fig, ax = plt.subplots()
plt.plot(x['var1'], ypred, 'o', validation['var1'], validation['y'], 'ro');
ax.set_title('blue: true,   red: OLS')
ax.set_xlabel('X')
ax.set_ylabel('Y')
plt.show()

In multiple linear regression, why does a plot of predicted points not lie in a straight line?

I'm using multiple linear regression to describe relationships between Y and X1,X2.

From theory I understood that multiple regression assumes linear relationships between Y and each of X (Y and X1, Y and X2). I'm not using any transformation of X.

So, I got the model with R=0.45 and all significant X (P<0.05). Then I plotted Y against X1. I don't understand why red-colored circles that are predictions of the model do not form a line. As I said before, I expected that each pair of Y and X is fitted by a line.

enter image description here

The plot is generated in python this way:

fig, ax = plt.subplots()
plt.plot(x['var1'], ypred, 'o', validation['var1'], validation['y'], 'ro');
ax.set_title('blue: true,   red: OLS')
ax.set_xlabel('X')
ax.set_ylabel('Y')
plt.show()
added 266 characters in body
Source Link
Klausos
  • 499
  • 1
  • 6
  • 12

I'm using multiple linear regression to describe relationships between Y and X1,X2. From theory I understood that multiple regression assumes linear relationships between Y and each of X (Y and X1, Y and X2). I'm not using any transformation of X. So, I got the model with R=0.45 and all significant X (P<0.05). Then I plotted Y against X1. I don't understand why red-colored circles that are predictions of the model do not form a line. As I said before, I expected that each pair of Y and X is fitted by a line.

enter image description here

The plot is generated in python this way:

fig, ax = plt.subplots()
plt.plot(x['var1'], ypred, 'o', validation['var1'], validation['y'], 'ro');
ax.set_title('blue: true,   red: OLS')
ax.set_xlabel('X')
ax.set_ylabel('Y')
plt.show()

I'm using multiple linear regression to describe relationships between Y and X1,X2. From theory I understood that multiple regression assumes linear relationships between Y and each of X (Y and X1, Y and X2). I'm not using any transformation of X. So, I got the model with R=0.45 and all significant X (P<0.05). Then I plotted Y against X1. I don't understand why red-colored circles that are predictions of the model do not form a line. As I said before, I expected that each pair of Y and X is fitted by a line.

enter image description here

I'm using multiple linear regression to describe relationships between Y and X1,X2. From theory I understood that multiple regression assumes linear relationships between Y and each of X (Y and X1, Y and X2). I'm not using any transformation of X. So, I got the model with R=0.45 and all significant X (P<0.05). Then I plotted Y against X1. I don't understand why red-colored circles that are predictions of the model do not form a line. As I said before, I expected that each pair of Y and X is fitted by a line.

enter image description here

The plot is generated in python this way:

fig, ax = plt.subplots()
plt.plot(x['var1'], ypred, 'o', validation['var1'], validation['y'], 'ro');
ax.set_title('blue: true,   red: OLS')
ax.set_xlabel('X')
ax.set_ylabel('Y')
plt.show()
Source Link
Klausos
  • 499
  • 1
  • 6
  • 12

Misunderstanding of multiple linear regression

I'm using multiple linear regression to describe relationships between Y and X1,X2. From theory I understood that multiple regression assumes linear relationships between Y and each of X (Y and X1, Y and X2). I'm not using any transformation of X. So, I got the model with R=0.45 and all significant X (P<0.05). Then I plotted Y against X1. I don't understand why red-colored circles that are predictions of the model do not form a line. As I said before, I expected that each pair of Y and X is fitted by a line.

enter image description here