infIndexPlot | R Documentation |
Provides index plots of influence and related diagnostics for a regression model.
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", ...)
model |
A regression object of class |
vars |
All the quantities listed in this argument are plotted. Use |
main |
main title for graph |
id |
a list of named values controlling point labelling. The default, |
grid |
If TRUE, the default, a light-gray background grid is put on the graph. |
... |
Arguments passed to |
Used for its side effect of producing a graph. Produces index plots of diagnostic quantities.
Sanford Weisberg sandy@umn.edu and John Fox
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.
cooks.distance
, rstudent
,
outlierTest
, hatvalues
, influence.mixed.models
.
influenceIndexPlot(lm(prestige ~ income + education + type, Duncan)) ## Not run: # a little slow if (require(lme4)){ print(fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)) # from ?lmer infIndexPlot(influence(fm1, "Subject")) infIndexPlot(influence(fm1)) } if (require(lme4)){ gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd), data = cbpp, family = binomial) # from ?glmer infIndexPlot(influence(gm1, "herd", maxfun=100)) infIndexPlot(influence(gm1, maxfun=100)) gm1.11 <- update(gm1, subset = herd != 11) # check deleting herd 11 compareCoefs(gm1, gm1.11) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.