Aan de slagGa gratis aan de slag

Visualizing the distribution of residuals

Let's now compute both the predicted score \(\hat{y}\) and the residual \(y - \hat{y}\) for all \(n = 463\) instructors in the evals dataset. Furthermore, you'll plot a histogram of the residuals and see if there are any patterns to the residuals, i.e. your predictive errors.

model_score_4 from the previous exercise is available in your workspace.

Deze oefening maakt deel uit van de cursus

Modeling with Data in the Tidyverse

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Calculate predictions and residuals
model_score_4_points <- ___
model_score_4_points
Code bewerken en uitvoeren