search for: lefthandsideofformula

Displaying 1 result from an estimated 1 matches for "lefthandsideofformula".

2007 Jan 12
5
Regression lines
My simpleminded understanding of simple regression is that when plotting regression lines for x on y and y on x in the same plot, the lines should cross each other at the respective means. But, given the R function below, abline (lm(y~x)) works fine, but abline (lm(x~y)) does not. Why? function () { attach (attitude) x <- rating y <- learning detach (attitude) plot (x, y)