Created
October 18, 2017 13:32
-
-
Save 3inar/cc18a480aebe1d6998a579e727fc8be6 to your computer and use it in GitHub Desktop.
2017-10-18 untitled from rstudio
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
# regression to the mean | |
n <- 10000 | |
base <- runif(n, 0,10) | |
dat <- data.frame(x=base+rnorm(n), y=base+rnorm(n)) | |
plot(dat) | |
abline(0,1, col="grey") | |
abline(lm(y~x, data=dat)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment