library(ggplot2)
library(broom)
# Verbal scores
ggplot(satgpa, aes(x = sat_v, fy_gpa)) +
geom_point() +
geom_smooth(method = "lm") +
labs(
x = "Verbal SAT percentile",
y = "First year (college) grade point average"
)
mod <- lm(fy_gpa ~ sat_v, data = satgpa)
tidy(mod)
# Math scores
ggplot(satgpa, aes(x = sat_m, fy_gpa)) +
geom_point() +
geom_smooth(method = "lm") +
labs(
x = "Math SAT percentile",
y = "First year (college) grade point average"
)
mod <- lm(fy_gpa ~ sat_m, data = satgpa)
tidy(mod)
Run the code above in your browser using DataLab