Skip to content

Instantly share code, notes, and snippets.

@aaroncharlton
Created April 3, 2020 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaroncharlton/3d8ea1b978de1f5d11700293d0f38c6c to your computer and use it in GitHub Desktop.
Save aaroncharlton/3d8ea1b978de1f5d11700293d0f38c6c to your computer and use it in GitHub Desktop.
mtcars
?mtcars
names(mtcars)
# Goal: Maximize mpg
model2 <- lm(mpg ~ wt+hp, data = mtcars)
summary(model2)
37-3.9*2.6-.03*110
library(ggplot2)
ggplot(mtcars, aes(x = disp, y = hp)) +
geom_point() +
geom_smooth(method = "lm")
model3 <- lm(hp ~ carb+disp, data=mtcars)
summary(model3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment