dot-residual.plot: Residual Plots

Description Usage Arguments Details Author(s) See Also Examples

Description

Displays a plot with four panels:

Usage

1
.residual.plot(yhat, epsilonhat, tepsilonhat, h)

Arguments

yhat

Numeric vector of length n or n by 1 numeric matrix. n \times 1 vector of predicted values of \mathbf{y} ≤ft( \mathbf{\hat{y}} \right).

epsilonhat

Numeric vector of length n or n by 1 numeric matrix. n \times 1 vector of residuals ≤ft( \boldsymbol{\hat{ε}} \right).

tepsilonhat

Numeric vector of length n or n by 1 numeric matrix. n \times 1 vector of studentized residuals.

h

Numeric vector of length n or n by 1 numeric matrix. n \times 1 vector of leverage values.

Details

Based on the diagnostic plots in the car package.

Author(s)

Ivan Jacob Agaloos Pesigan

See Also

Other plotting functions: .scatter.plot()

Examples

 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
)

jeksterslabds/jeksterslabRplots documentation built on Aug. 9, 2020, 12:34 a.m.