This function creates various types of
“bubble” plots of influence measures with the areas of the circles representing the
observations proportional to Cook's distances.
type="stres" plots squared (internally) Studentized residuals against hat values;
type="cookd" plots Cook's distance against hat values;
type="LR" plots residual components against leverage components,
with the property that contours of constant Cook's distance fall on diagonal
lines with slope = -1.
Usage
## S3 method for class 'mlm'
influencePlot(model, scale = 12, type=c("stres", "LR", "cookd"),
infl = mlm.influence(model, do.coef = FALSE), FUN = det,
fill = TRUE, fill.col = "red", fill.alpha.max = 0.5,
labels,
id.method = "noteworthy", id.n = if (id.method[1] == "identify") Inf else 0,
id.cex = 1, id.col = palette()[1],
ref.col = "gray", ref.lty = 2, ref.lab = TRUE, ...)
Arguments
model
An mlm object, as returned by lm with a multivariate response.
scale
a factor to adjust the radii of the circles, in relation to sqrt(CookD)
type
Type of plot: one of c("stres", "cookd", "LR")
infl
influence measure structure as returned by mlm.influence
FUN
For m>1, the function to be applied to the H and Q
matrices returning a scalar value. FUN=det and FUN=tr
are possible choices, returning the |H| and tr(H)
respectively.
labels, id.method, id.n, id.cex, id.col
settings for labelling
points; see link{showLabels} for details. To omit point labelling, set
id.n=0, the default. The default id.method="noteworthy" is used
in this function to indicate setting labels for points with large
Studentized residuals, hat-values or Cook's distances. See Details below. Set
id.method="identify" for interactive point identification.
fill, fill.col, fill.alpha.max
fill: logical, specifying whether the circles should be filled.
When fill=TRUE, fill.col gives the base fill color
to which transparency specified by fill.alpha.max is applied.
ref.col, ref.lty, ref.lab
arguments for reference lines. Incompletely implemented in this version
...
other arguments passed down
Details
The id.method="noteworthy" setting
also requires setting id.n>0 to have any effect.
Using id.method="noteworthy", and id.n>0, the number of points labeled
is the union of the largest id.n values on each of L, R, and CookD.
Value
If points are identified, returns a data frame with the hat values,
Studentized residuals and Cook's distance of the identified points. If
no points are identified, nothing is returned. This function is primarily
used for its side-effect of drawing a plot.
Author(s)
Michael Friendly
References
Barrett, B. E. and Ling, R. F. (1992).
General Classes of Influence Measures for Multivariate Regression.
Journal of the American Statistical Association, 87(417), 184-191.
McCulloch, C. E. & Meeter, D. (1983).
Discussion of "Outliers..." by R. J. Beckman and R. D. Cook.
Technometrics, 25, 152-155