Entering edit mode
2.9 years ago
glyptonotus
▴
20
Hi all,
I am plotting data instances attending to two different variables (x, y) and the linear regression line between them: lm(x~y). I don't understand why, when I plot the opposite relationship: lm(y~x), I get a very similar line, instead of a specular/opposed one. Showing figure 1 (x~y), I would expect a line like the green one in figure 2 (y~x), but I get the red line.
I have checked the linear regression code in both cases:
lm(formula=x~y, data=data) # for figure 1
lm(formula=y~x, data=data) # for figure 2
Could anyone suggest any possible mistake I am doing? Thank you.
This post does not fit the theme of this forum. Please consult stats SE.
Check the dataset, it looks quite symmetrical, maybe erroneously it really is the same in x and y.