Fit Generalized Estimating Equations (GEE)
The geeglm function fits generalized estimating equations using the 'geese.fit' function of the 'geepack' package for doing the actual computations. geeglm has a syntax similar to glm and returns an object similar to a glm object. An important feature of geeglm, is that an anova method exists for these models.
geeglm( formula, family = gaussian, data = parent.frame(), weights, subset, na.action, start = NULL, etastart, mustart, offset, control = geese.control(...), method = "glm.fit", contrasts = NULL, id, waves = NULL, zcor = NULL, corstr = "independence", scale.fix = FALSE, scale.value = 1, std.err = "san.se", ... )
formula |
See corresponding documentation to |
family |
See corresponding documentation to |
data |
See corresponding documentation to |
weights |
See corresponding documentation to |
subset |
See corresponding documentation to |
na.action |
No action is taken. Indeed geeglm only works on complete data. |
start |
See corresponding documentation to |
etastart |
See corresponding documentation to |
mustart |
See corresponding documentation to |
offset |
See corresponding documentation to |
control |
See corresponding documentation to |
method |
See corresponding documentation to |
contrasts |
See corresponding documentation to |
id |
a vector which identifies the clusters. The length of ‘id’ should be the same as the number of observations. Data are assumed to be sorted so that observations on each cluster appear as contiguous rows in data. If data is not sorted this way, the function will not identify the clusters correctly. If data is not sorted this way, a warning will be issued. Please consult the package vignette for details. |
waves |
Wariable specifying the ordering of repeated mesurements on the same unit. Also used in connection with missing values. Please consult the package vignette for details. |
zcor |
Used for entering a user defined working correlation structure. |
corstr |
a character string specifying the correlation structure. The following are permitted: '"independence"', '"exchangeable"', '"ar1"', '"unstructured"' and '"userdefined"' |
scale.fix |
a logical variable; if true, the scale parameter is fixed at the value of 'scale.value'. |
scale.value |
numeric variable giving the value to which the scale parameter should be fixed; used only if 'scale.fix = TRUE'. |
std.err |
Type of standard error to be calculated. Defualt 'san.se' is the usual robust estimate. Other options are 'jack': if approximate jackknife variance estimate should be computed. 'j1s': if 1-step jackknife variance estimate should be computed. 'fij': logical indicating if fully iterated jackknife variance estimate should be computed. |
... |
further arguments passed to or from other methods. |
In the case of corstr="fixed" one must provide the zcor vector if the clusters have unequal sizes. Clusters with size one must not be represented in zcor.
An object of type 'geeglm'
Use "unstructured" correlation structure only with great care. (It may cause R to crash).
See the documentation for the 'geese' function for additional information. geeglm only works for complete data. Thus if there are NA's in data you can specify data=na.omit(mydata).
Søren Højsgaard, sorenh@math.aau.dk
Halekoh, U.; Højsgaard, S. and Yan, J (2006) The R Package geepack for Generalized Estimating Equations. Journal of Statistical Software, 15, 2, 1-11"
Liang, K.Y. and Zeger, S.L. (1986) Longitudinal data analysis using generalized linear models. Biometrika, *73* 13-22.
Prentice, R.L. and Zhao, L.P. (1991). Estimating equations for parameters in means and covariances of multivariate discrete and continuous responses. Biometrics, *47* 825-839.
data(dietox) dietox$Cu <- as.factor(dietox$Cu) mf <- formula(Weight ~ Cu * (Time + I(Time^2) + I(Time^3))) gee1 <- geeglm(mf, data=dietox, id=Pig, family=poisson("identity"), corstr="ar1") gee1 coef(gee1) vcov(gee1) summary(gee1) coef(summary(gee1)) mf2 <- formula(Weight ~ Cu * Time + I(Time^2) + I(Time^3)) gee2 <- geeglm(mf2, data=dietox, id=Pig, family=poisson("identity"), corstr="ar1") anova(gee2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.