9/22/2011
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
- Start with full model
- 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
- Use R to apply the transformations in 3.36 to evaluate SSE for different values of lamda. One way to do this is with the geometric mean command in the psyc package.
- 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 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
Please read Chapter 4 for class on Tuesday. We will complete the problem session on Tuesday and move into Chapter 4.