Computes some measures and, optionally, display graphs of them to perform influence analysis based on the approaches described by Cook (1986).
# S3 method for glm
localInfluence(
object,
type = c("total", "local"),
perturbation = c("case-weight", "response", "covariate"),
covariate,
coefs,
plot.it = FALSE,
identify,
...
)
A matrix as many rows as observations in the sample and one column with the values of the measures of local influence.
an object of class glm.
an (optional) character string indicating the type of approach to study the
local influence. The options are: the absolute value of the elements of the eigenvector which corresponds to the maximum absolute eigenvalue ("local"); and the absolute value of the elements of the main diagonal ("total"). As default, type
is set to "total".
an (optional) character string indicating the perturbation scheme
to apply. The options are: case weight perturbation of observations ("case-weight"); perturbation of covariates ("covariate"); and perturbation of response ("response"). As default, perturbation
is set to "case-weight".
an character string which (partially) match with the names of one of
the parameters in the linear predictor. This is only appropriate if perturbation="covariate"
.
an (optional) character string which (partially) match with the names of some of the parameters in the linear predictor.
an (optional) logical indicating if the plot of the measures of local
influence is required or just the data matrix in which that plot is based. By default,
plot.it
is set to FALSE
.
an (optional) integer indicating the number of observations to identify
on the plot of the measures of local influence. This is only appropriate if
plot.it=TRUE
.
further arguments passed to or from other methods. If plot.it=TRUE
then ...
may be used to include graphical parameters to customize the plot. For example, col
, pch
, cex
, main
, sub
, xlab
, ylab
.
Cook D. (1986) Assessment of Local Influence. Journal of the Royal Statistical Society: Series B (Methodological) 48, 133-155.
Thomas W., Cook D. (1989) Assessing Influence on Regression Coefficients in Generalized Linear Models. Biometrika 76, 741-749.