leverage.glmgee: Leverage for Generalized Estimating Equations

View source: R/geeglm.R

leverage.glmgeeR Documentation

Leverage for Generalized Estimating Equations

Description

Computes and, optionally, displays a graph of the leverage measures at the cluster- and observation-level.

Usage

## S3 method for class 'glmgee'
leverage(
  object,
  level = c("clusters", "observations"),
  plot.it = FALSE,
  identify,
  ...
)

Arguments

object

an object of class glmgee.

level

an (optional) character string indicating the level for which the leverage measures are required. The options are: cluster-level ("clusters") and observation-level ("observations"). By default, level is set to be "clusters".

plot.it

an (optional) logical indicating if the plot of the measures of leverage are 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 (level=``clusters'') or observations (level=``observations'') to identify on the plot of the leverage measures. This is only appropriate if plot.it is specified to be TRUE.

...

further arguments passed to or from other methods. If plot.it is specified to be TRUE then ... may be used to include graphical parameters to customize the plot. For example, col, pch, cex, main, sub, xlab, ylab.

Value

A vector with the values of the leverage measures with so many rows as clusters (level=``clusters'') or observations (level=``observations'') in the sample.

References

Preisser J.S., Qaqish B.F. (1996). Deletion diagnostics for generalised estimating equations. Biometrika, 83:551-562.

Hammill B.G., Preisser J.S. (2006). A SAS/IML software program for GEE and regression diagnostics. Computational Statistics & Data Analysis, 51:1197-1212.

Examples


###### Example 1: Tests of Auditory Perception in Children with OME
OME <- MASS::OME
mod <- cbind(Correct, Trials-Correct) ~ Loud + Age + OME
fit1 <- glmgee(mod, family = binomial(cloglog), id = ID, corstr = "Exchangeable", data = OME)
leverage(fit1,level="clusters",plot.it=TRUE)

###### Example 2: Guidelines for Urinary Incontinence Discussion and Evaluation
data(GUIDE)
mod <- bothered ~ gender + age + dayacc + severe + toilet
fit2 <- glmgee(mod, family=binomial(logit), id=practice, corstr="Exchangeable", data=GUIDE)
leverage(fit2,level="clusters",plot.it=TRUE)
leverage(fit2,level="observations",plot.it=TRUE)


glmtoolbox documentation built on Oct. 10, 2023, 9:06 a.m.