Last active
June 11, 2018 05:54
-
-
Save yfwu/c08c2dde3c10e4428af0181a81cddf17 to your computer and use it in GitHub Desktop.
Linear regression plotting
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
labor<- c(115.63, 134.13, 140.31, 125.14, 76.96, 78.3, 67.71, 72.36, 96.14, 111.82, 113.46, 73.67, 125.6, 143.78, 136.28, 131.65) | |
marriage<- c(46.96, 21.47, 24.75, 31.36, 50.37, 49.41, 37.36, 32.11, 0, 23.88, 35.43, 11.73, 53.58, 51.9, 99.74, 0) | |
plot(labor, marriage) | |
mod <- lm(marriage ~ labor) | |
abline(mod, col=2, lwd=3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment