localInfluence.glmgee: Local Influence for Generalized Estimating Equations

Description Usage Arguments Value References Examples

View source: R/geeglm.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'glmgee'
localInfluence(
  object,
  type = c("total", "local"),
  perturbation = c("cw-clusters", "cw-observations", "response", "covariate"),
  covariate,
  coefs,
  plot.it = FALSE,
  identify,
  ...
)

Arguments

object

an object of class glmgee obtained from the fit of a generalized estimating equation.

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"). By default, type is set to be "total".

perturbation

an (optional) character string indicating the perturbation scheme to apply. The options are: case weight perturbation of clusters ("cw-clusters"); Case weight perturbation of observations ("cw-observations"); perturbation of covariates ("covariate"); and perturbation of response ("response"). By default, perturbation is set to be "cw-clusters".

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 be FALSE.

identify

an (optional) integer indicating the number of clusters/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 clusters/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.

Jung K.-M. (2008) Local Influence in Generalized Estimating Equations. Scandinavian Journal of Statistics 35, 286-294.

Examples

1
2
3
4
mod <- size ~ poly(days,4) + treat
fit <- glmgee(mod, id=tree, family=Gamma("log"), corstr="AR-1", data=spruces)
summary(fit)
localInfluence(fit,type="total",perturbation="cw-clusters",coefs="treat",plot.it=TRUE)

glmtoolbox documentation built on Oct. 4, 2021, 9:08 a.m.