Description Usage Arguments Details Author(s) See Also Examples
Displays a plot with four panels:
residuals vs. fitted values
normal qq plot of residuals
scale location
residuals vs. leverage
1 | .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.
Ivan Jacob Agaloos Pesigan
Other plotting functions:
.scatter.plot()
1 2 3 4 5 6 7 8 9 10 11 12 | 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
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.