Transforming the response |
Looking at the plot of the residuals against the fitted values, there appears to be some non-linearity. This is not always easy to diagnose, because we have a tendency to see patterns even where there is just randomness, like constellations in the night sky. However, it won't hurt to explore the possibility a bit. We have started by representing fuel consumption in the standard form used in the US: miles per gallon. There is nothing sacred about this measurement scale - we could equally well have started with gallons per mile, or liters per kilometer. Lets try again, using the new scale, which we can call Hgpm (Highway gallons per mile).
Hgpm <- 1/Hmpg plot(Wgt,Hgpm)
ExerciseFit the regression line for the Hgpm and Wgt data, and plot the residuals. Which regression model seems more appropriate, the model with Hgpm or Hmpg? Note that you can't decide which fits better just by looking at the residual standard error (ie. the typical sizes of the residuals), since the response variables are measured in different scales. Look at the various residual plots (residuals vs fitted values, qqnorm, etc) for the two models, and compare them. What should you see if there really is a linear relationship, with random variation of constant spread about the line? It may help to add a "lowess" fit to the either the original scatterplots or the residual plots with the lines function.Print the plots of residuals vs. fitted values and the qqnorm plots for the Hmpg and Hgpm models, and briefly describe the features in the plots that support your choice of model. To save paper, you may want to make 4 plots in one plot window with par(mfrow=c(2,2)). Explain in words the meaning of the slope coefficient for your model. Suppose that you transport a box weighing 100 lbs. in your car. Would you expect the slope coefficient for a model like this to predict the change in fuel consumption? What fuel consumption does your model predict for a car of that vintage that weighed 2500 lbs, and roughly how accurate is this prediction? |