# 2/1/2017

## Diagnostics and remedial measures

• Residuals
• Standardized residuals
• Checking model assumptions with residual plots
• Nonconstant variance
• Nonlinear relationship
• Dependence
• Outliers
• Normality (normal quantile plot) - use qqplot and qqline in R
• Tests for normality
1. Correlation test for normality - based on expected value of ordered residuals
• Compute the expected value of the ordered residual (see p. 111)
• Find correlation coefficient between ordered residuals and their expected values.
2. Use Shapiro-Wilk test, Kolmogorov test, or one of the other tests from norm.test
• Tests for constant variance
1. Modified Levene Test (Brown-Forythe Test)
• Form 2 or more groups, based on the value of x
• Find the medians of the residuals for both groups
• Form the absolute deviations (from their respective median) of the residuals
• Use the pooled t-test to see if the absolute deviations differ, on average, for the two groups.
2. Breusch-Pagan Test
• Assume that the natural log of the variance has a linear relationship with x (i.e., the variance increases or decreases with x)
• Regress the squared residuals against x
• Form the test statistic on p. 119

## In Class Exercise

• Exercise 3.4 on p. 147