Search⌘ K

Observed/Fitted Values and Residuals

Explore how to calculate observed and fitted values along with residuals for interaction models in multiple regression. Learn to automate these calculations for large datasets using R functions and interpret residuals to evaluate model predictions.

We'll cover the following...

In this lesson, we’ll only compute the observed values, fitted values, and residuals for the interaction model, which we saved in score_model_interaction.

Say we have an instructor who identifies as female and is 36 years old. What fitted value y^=score^\hat y = \widehat{\texttt{score}} will our model yield? Say we have another instructor who identifies as male and is 59 years old. What will their fitted value y^\hat y be?

We answer this question visually first for the female instructor by finding the intersection of the red regression line and the vertical line at x=x = age ...