Learn R Programming

car (version 1.2-16)

influencPlot: Regression Influence Plot

Description

This function creates a "bubble" plot of studentized residuals by hat values, with the areas of the circles representing the observations proportional to Cook's distances. Vertical reference lines are drawn at twice and three times the average hat value, horizontal reference lines at -2, 0, and 2 on the studentized-residual scale.

Usage

influencePlot(model, ...)

## S3 method for class 'lm':
influencePlot(model, scale=10, col=c(1,2), identify=c(TRUE, FALSE, "auto"),
		labels=names(rstud), cex.identify=par("cex"), col.identify=par("col"), ...)

Arguments

model
a linear or generalized-linear model.
scale
a factor to adjust the size of the circles.
col
colors for plotting points that do not and do have noteworthy Cook's distances.
identify
identify points; if TRUE, the default, identify points interactively; if "auto" then points with large Cook's distances will automatically be identified.
labels
a vector of observation labels.
cex.identify, col.identify
for point labels.
...
arguments to pass to the plot function.

Value

  • Returns the indices of identified points.

References

J. Fox (2002) An R and S-PLUS Companion to Applied Regression. Sage.

See Also

cookd, rstudent, hatvalues

Examples

Run this code
influencePlot(lm(prestige ~ income + education, data=Duncan), 
    	identify="auto")

Run the code above in your browser using DataLab