Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

infIndexPlot

Influence Index Plot


Description

Provides index plots of influence and related diagnostics for a regression model.

Usage

infIndexPlot(model, ...)

influenceIndexPlot(model, ...)

## S3 method for class 'lm'
infIndexPlot(model, vars=c("Cook", "Studentized", "Bonf", "hat"),
    id=TRUE, grid=TRUE, main="Diagnostic Plots", ...)

## S3 method for class 'influence.merMod'
infIndexPlot(model,
    vars = c("dfbeta", "dfbetas", "var.cov.comps",
    "cookd"), id = TRUE, grid = TRUE, main = "Diagnostic Plots", ...)
## S3 method for class 'influence.lme'
infIndexPlot(model,
    vars = c("dfbeta", "dfbetas", "var.cov.comps",
    "cookd"), id = TRUE, grid = TRUE, main = "Diagnostic Plots", ...)

Arguments

model

A regression object of class lm, glm, or lmerMod, or an influence object for a lmer, glmer, or lme object (see influence.mixed.models). The "lmerMod" method calls the "lm" method and can take the same arguments.

vars

All the quantities listed in this argument are plotted. Use "Cook" for Cook's distances, "Studentized" for Studentized residuals, "Bonf" for Bonferroni p-values for an outlier test, and and "hat" for hat-values (or leverages) for a linear or generalized linear model, or "dfbeta", "dfbetas", "var.cov.comps", and "cookd" for an influence object derived from a mixed model. Capitalization is optional. All but "dfbeta" and "dfbetas" may be abbreviated by the first one or more letters.

main

main title for graph

id

a list of named values controlling point labelling. The default, TRUE, is equivalent to id=list(method="y", n=2, cex=1, col=carPalette()[1], location="lr"); FALSE suppresses point labelling. See showLabels for details.

grid

If TRUE, the default, a light-gray background grid is put on the graph.

...

Arguments passed to plot

Value

Used for its side effect of producing a graph. Produces index plots of diagnostic quantities.

Author(s)

Sanford Weisberg sandy@umn.edu and John Fox

References

Cook, R. D. and Weisberg, S. (1999) Applied Regression, Including Computing and Graphics. Wiley.

Fox, J. (2016) Applied Regression Analysis and Generalized Linear Models, Third Edition. Sage. Fox, J. and Weisberg, S. (2019) An R Companion to Applied Regression, Third Edition, Sage.

Weisberg, S. (2014) Applied Linear Regression, Fourth Edition, Wiley.

See Also

Examples

influenceIndexPlot(lm(prestige ~ income + education + type, Duncan))

car

Companion to Applied Regression

v3.0-10
GPL (>= 2)
Authors
John Fox [aut, cre], Sanford Weisberg [aut], Brad Price [aut], Daniel Adler [ctb], Douglas Bates [ctb], Gabriel Baud-Bovy [ctb], Ben Bolker [ctb], Steve Ellison [ctb], David Firth [ctb], Michael Friendly [ctb], Gregor Gorjanc [ctb], Spencer Graves [ctb], Richard Heiberger [ctb], Pavel Krivitsky [ctb], Rafael Laboissiere [ctb], Martin Maechler [ctb], Georges Monette [ctb], Duncan Murdoch [ctb], Henric Nilsson [ctb], Derek Ogle [ctb], Brian Ripley [ctb], William Venables [ctb], Steve Walker [ctb], David Winsemius [ctb], Achim Zeileis [ctb], R-Core [ctb]
Initial release
2020-09-23

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.