Session Ready
Exercise

Using residuals (1)

In the next few exercises, you will calculate residuals from a data set that complies with the linear regression technical conditions. For the linear model conditions to hold, the points should be scattered throughout the residual plot with no discernible pattern. Here, the residual plot looks like a scattering of points.

Instructions 1/2
undefined XP
  • 1

    Using hypdata_nice, draw a scatter plot of response versus explanatory.

    • 2
      • Run a linear regression of response versus explanatory on hypdata_nice.
      • Get the observation-level information from the model using augment.
      • Using modeled_observations, plot .resid vs. .fitted and add a point layer.