Exercise

Using residuals (2)

Now, you will calculate residuals from a data set that violates the technical conditions. For the linear model conditions to hold, the points should be scattered throughout the residual plot with no discernible pattern. Here the residuals reveal a violation of the technical conditions.

Instructions 1/2

undefined XP
  • 1

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

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