dfbeta.glmgee: Dfbeta for Generalized Estimating Equations

Description Usage Arguments Details Value References Examples

View source: R/geeglm.R

Description

Produces an approximation, better known as the one-step approximation, of the effect of deleting each cluster in turn on the estimates of the parameters in the linear predictor of a generalized estimating equation. This function also can produce a plot of those effects for a subset of the parameters in the linear predictor.

Usage

1
2
## S3 method for class 'glmgee'
dfbeta(model, coefs, identify, ...)

Arguments

model

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

coefs

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

identify

an (optional) integer indicating the number of clusters to identify on the plot of dfbeta. This is only appropriate if coefs is specified.

...

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

Details

The one-step approximation of the estimates of the parameters in the linear predictor of a GEE when the i-th cluster is excluded from the dataset is given by the vector obtained as the result of the first iteration of the fitting algorithm of that GEE when it is performed using: (1) a dataset in which the i-th cluster is excluded; and (2) a starting value which is the solution to the same GEE but based on the dataset inluding all clusters.

Value

A matrix with so many rows as clusters in the sample and so many columns as parameters in the linear predictor. The i-th row of that matrix corresponds to the difference between the estimates of the parameters in the linear predictor using all clusters and the one-step approximation of those estimates when the i-th cluster is excluded from the dataset.

References

Pregibon D. (1981). Logistic regression diagnostics. The Annals of Statistics, 9, 705-724.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mod <- size ~ poly(days,4) + treat
fit <- glmgee(mod, id=tree, family=Gamma("log"), data=spruce, corstr="Exchangeable")
dfbs <- dfbeta(fit, coefs="treat" ,col="red", lty=1, lwd=1, col.lab="blue",
               col.axis="blue", col.main="black", family="mono", cex=0.8, main="Dfbeta")

# Calculation by hand of dfbeta for the tree labeled by "N1T01"
idtree <- "N1T01"
onestep <- glmgee(mod, id=tree, family=Gamma("log"), data=spruce, corstr="Exchangeable",
                  start=coef(fit), subset=c(tree!=idtree), maxit=1)
coef(fit)-coef(onestep)
dfbs[rownames(dfbs)==idtree,]

glmtoolbox documentation built on June 9, 2021, 9:07 a.m.