leverage.glmgee | R Documentation |
Computes and, optionally, displays a graph of the leverage measures at the cluster- and observation-level.
## S3 method for class 'glmgee'
leverage(
object,
level = c("clusters", "observations"),
plot.it = FALSE,
identify,
...
)
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"). As default, |
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. As default, |
identify |
an (optional) integer indicating the number of ( |
... |
further arguments passed to or from other methods. If |
A vector with the values of the leverage measures with so many rows as clusters (level=``clusters''
) or observations (level=``observations''
) in the sample.
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.
###### 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.