localInfluence.glmgee {glmtoolbox} | R Documentation |
Local Influence for Generalized Estimating Equations
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
## S3 method for class 'glmgee'
localInfluence(
object,
type = c("total", "local"),
perturbation = c("cw-clusters", "cw-observations", "response"),
coefs,
plot.it = FALSE,
identify,
...
)
Arguments
object |
an object of class glmgee. |
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 elements of the main diagonal ("total"). As default, |
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"); and perturbation of response ("response"). As default, |
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. As default, |
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 |
... |
further arguments passed to or from other methods. If |
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
###### Example 1: Effect of ozone-enriched atmosphere on growth of sitka spruces
data(spruces)
mod1 <- size ~ poly(days,4) + treat
fit1 <- glmgee(mod1, id=tree, family=Gamma(log), corstr="AR-M-dependent", data=spruces)
localInfluence(fit1,type="total",perturbation="cw-clusters",coefs="treat",plot.it=TRUE)
###### Example 2: Treatment for severe postnatal depression
data(depression)
mod2 <- depressd ~ visit + group
fit2 <- glmgee(mod2, id=subj, family=binomial(logit), corstr="AR-M-dependent", data=depression)
localInfluence(fit2,type="total",perturbation="cw-clusters",coefs="group",plot.it=TRUE)
###### Example 3: Treatment for severe postnatal depression (2)
mod3 <- dep ~ visit*group
fit3 <- glmgee(mod3, id=subj, family=gaussian(identity), corstr="AR-M-dependent", data=depression)
localInfluence(fit3,type="total",perturbation="cw-clusters",coefs="visit:group",plot.it=TRUE)