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",
...
)
An object of type 'geeglm'
See corresponding documentation to glm
See corresponding documentation to glm
See corresponding documentation to glm
See corresponding documentation to glm
See corresponding documentation to glm
No action is taken. Indeed geeglm only works on complete data.
See corresponding documentation to glm
See corresponding documentation to glm
See corresponding documentation to glm
See corresponding documentation to glm
See corresponding documentation to glm
See corresponding documentation to glm
See corresponding documentation to glm
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.
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.
Used for entering a user defined working correlation structure.
a character string specifying the correlation structure. The following are permitted: '"independence"', '"exchangeable"', '"ar1"', '"unstructured"' and '"userdefined"'
a logical variable; if true, the scale parameter is fixed at the value of 'scale.value'.
numeric variable giving the value to which the scale parameter should be fixed; used only if 'scale.fix = TRUE'.
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.
Use "unstructured" correlation structure only with great care. (It may cause R to crash).
Søren Højsgaard, sorenh@math.aau.dk
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.
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.
geese
, glm
, anova.geeglm
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)
Run the code above in your browser using DataLab