Session Ready
Exercise

Mileage and age interacting

Here's a model you have already seen for the prices of used cars:

model_1 <- lm(Price ~ Age + Mileage, 
              data = Used_Fords)

Your task…

Instructions
100 XP
  • Train model_1 as given above.
  • Train model_2 the same as model_1, but including an interaction between Age and Mileage.
  • Use fmodel() to plot both models. How are they different?
  • Use cross validation to compare the prediction errors of model_1 and model_2.