localInfluence.glm: Local Influence for Generalized Linear Models

View source: R/glms.R

localInfluence.glmR Documentation

Local Influence for Generalized Linear Models

Description

Computes some measures and, optionally, display graphs of them to perform influence analysis based on the approaches described by Cook (1986).

Usage

## S3 method for class 'glm'
localInfluence(
  object,
  type = c("total", "local"),
  perturbation = c("case-weight", "response", "covariate"),
  covariate,
  coefs,
  plot.it = FALSE,
  identify,
  ...
)

Arguments

object

an object of class glm.

type

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".

perturbation

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".

covariate

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".

coefs

an (optional) character string which (partially) match with the names of some of the parameters in the linear predictor.

plot.it

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.

identify

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.

Value

A matrix as many rows as observations in the sample and one column with the values of the measures of local influence.

References

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.


glmtoolbox documentation built on Sept. 11, 2024, 7:32 p.m.