Created
January 9, 2021 16:23
-
-
Save timcdlucas/1715984de5a1380f95f4cb844d52260b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = 100 | |
x = runif(n) | |
y = 1 + 2*x + rnorm(n) | |
yp = predict(lm(y~x)) | |
plot(y=yp, x=y) | |
abline(lm(yp~y), col="blue") | |
abline(a=0, b=1, col="red", lty="dashed") | |
plot(y=y, x=yp) | |
abline(lm(y~yp), col="blue") | |
abline(a=0, b=1, col="red", lty="dashed") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment