Displays a plot with four panels:
residuals vs. fitted values
normal qq plot of residuals
scale location
residuals vs. leverage
.residual.plot(yhat, epsilonhat, tepsilonhat, h)
yhat | Numeric vector of length |
---|---|
epsilonhat | Numeric vector of length |
tepsilonhat | Numeric vector of length |
h | Numeric vector of length |
Based on the diagnostic plots in the car
package.
Other plotting functions:
.scatter.plot()
model <- lm( wages ~ gender + race + union + education + experience, data = jeksterslabRdatarepo::wages ) yhat <- as.vector(predict(model)) epsilonhat <- as.vector(residuals(model)) tepsilonhat <- as.vector(rstudent(model)) h <- as.vector(hatvalues(model)) .residual.plot( yhat = yhat, tepsilonhat = tepsilonhat, epsilonhat = epsilonhat, h = h )