Computing fitted/predicted values & residuals
Now say you want to repeat this for all 463 instructors in evals. Doing this manually as you just did would be long and tedious, so as seen in the video, let's automate this using the get_regression_points() function.
Furthemore, let's unpack its output.
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Modeling with Data in the Tidyverse
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
# Fit regression model
model_score_2 <- lm(score ~ bty_avg, data = evals)
# Get regression table
___(___)
# Get all fitted/predicted values and residuals
___(___)