Regression Leverage Plots
These functions display a generalization, due to Sall (1990), of added-variable plots to multiple-df terms in a linear model. When a term has just 1 df, the leverage plot is a rescaled version of the usual added-variable (partial-regression) plot.
leverage.plots(model, term.name, ask=missing(term.name), ...) leverage.plot(model, ...) ## S3 method for class 'lm': leverage.plot(model, term.name, labels=names(residuals(model)[!is.na(residuals(model))]), identify.points=TRUE, las=par('las'), col=palette(), pch=1, lwd=2, main="Leverage Plot", ...) ## S3 method for class 'glm': leverage.plot(model, ...)
- model object produced by
- name of term in the model to be plotted; this argument is usually
TRUE, a menu is provided in the R Console for the user to select the term(s) to plot.
- observation names.
TRUE, then identify points interactively.
0, ticks labels are drawn parallel to the axis; set to
1for horizontal labels (see
- color for points and lines; the default is the second entry
in the current color palette (see
- plotting character for points; default is
1(a circle, see
- line width; default is
- title for plot.
- arguments passed down to method functions.
The function intended for direct use is
leverage.plots. By default, this
function is used interactively through a text menu.
The model can contain factors and interactions. A leverage plot can be
drawn for each term in the model, including the constant.
leverage.plot.glm is a dummy function, which generates an error message.
NULL. These functions are used for their side effect: producing plots.
Fox, J. (1997) Applied Regression, Linear Models, and Related Methods. Sage. Sall, J. (1990) Leverage plots for general linear hypotheses. American Statistician 44, 308--315.
data(Duncan) leverage.plots(lm(prestige~(income+education)*type, data=Duncan))