# 2/3/2017

## Diagnostics and remedial measures

• F-test for lack of fit
• Must have at least 2 repeated observations on a level of x
• See bank.R
• Consider the reduced model under the appropriate null hypothesis
• The difference between the two error sums of squares is SSLF (see Figure 3.12 on p. 125)
• See modified ANOVA table on p. 126
• Transformations for Nonlinear Relations
• Log
• Square
• Reciprocal
• Box-Cox Transformations - A general family of power transformations (Download and install MASS package)
• See plasma.R
• Scatterplot Smoothing Methods
• Method of moving averages
• Method of running medians
• Locally weighted scatterplot smoothing (LOWESS)

In class exercises

• Use R to assess the fit of the simple linear regression model for predicting performance score in Table 3.7. Apply the square root transformation to the number of training days and fit a transformed model. Apply other transformations to the response and predictor variables. Can you find a model that fits better than the square root transformation? Add a locally weighted scatterplot smoother to a scatterplot of the original data.
• Use R to assess the fit of the simple linear regression model for predicting plasma level from age for the 25 children in Table 3.8. Apply the log transformation to the plasma level and fit a transformed model. Apply other transformations to the response and predictor variables. Can you find a model that fits better than the square root transformation?Add a locally weighted scatterplot smoother to a scatterplot of the original data.
• Exercise 3.14 (a)
• Exercise 3.18