Generalized Estimating Equations
Produces an object of the class glmgee in which are stored the main results of the generalized estimating equation fitted to the data.
glmgee( formula, family = gaussian(), weights, id, waves, data, subset, corstr, corr, start, scale.fix = FALSE, scale.value, toler = 1e-07, maxit = 50, adjr2 = FALSE, ... )
formula |
a |
family |
a |
weights |
an (optional) vector of positive "prior weights" to be used in the fitting process. The length of |
id |
a vector which identifies the clusters. The length of |
waves |
an (optional) a positive integer-valued variable that is used to identify the order and spacing of observations within groups. This argument is crucial when there are missing values and gaps in the data. By default, |
data |
an (optional) |
subset |
an (optional) vector specifying a subset of observations to be used in the fitting process. |
corstr |
a character string specifying the (working) correlation structure. The available options are: "Independence", "Unstructured", "Stationary-M-dependent(m)", "Non-Stationary-M-dependent(m)", "AR-1", "Exchangeable" and "User-defined", where m represents the lag of the dependence. By default, |
corr |
an (optional) square matrix of the same dimension of the maximum cluster size containing the user specified correlation. This is only appropriate if |
start |
an (optional) vector of starting values for the parameters in the linear predictor. |
scale.fix |
an (optional) logical variable. If TRUE, the scale parameter is fixed at the value of |
scale.value |
an (optional) numeric variable giving the value to which the scale parameter should be fixed. This is only appropriate if |
toler |
an (optional) positive value which represents the convergence tolerance. The convergence is reached when the maximum of the relative differences between the values of the parameters in the linear predictor in consecutive iterations of the fitting algorithm is lower than |
maxit |
an (optional) integer value which represents the maximum number of iterations allowed for the fitting algorithm. By default, |
adjr2 |
an (optional) logical variable. If TRUE, the adjusted deviance-based R-squared is calculated. By default, |
... |
further arguments passed to or from other methods. |
If the value of waves
for a cluster of size 4 is 2, 4, 5, 6 then it means that the data on times 1 and 3 are missing, which should be taken into account by glmgee
to estimate the correlation matrix when its structure is assumed to be "Unstructured", "Stationary-M-dependent", "Non-Stationary-M-dependent" or "AR-1". If in this scenario waves
is not specified then glmgee
assumes that the available data for this cluster were taken on point times 1, 2, 3 and 4.
an object of the class glmgee in which are stored the main results of the generalized estimating equation fitted to the data. Some of those results can be easily accessed using functions as, for example, print()
, summary()
, model.matrix()
, estequa()
, coef()
, vcov()
, logLik()
, fitted()
, confint()
and predict()
. In addition, the model fitted to the data
can be assessed using functions as, for instance, anova.glmgee, residuals.glmgee, dfbeta.glmgee and cooks.distance.glmgee. The variable selection may be accomplished using stepCriterion.glmgee whereas the working–correlation–structure can be chosen by using criteria as QIC, CIC, DEW and RJC.
Liang K.Y. and Zeger S.L. (1986) Longitudinal data analysis using generalized linear models. Biometrika 73, 13-22.
Zeger S.L. and Liang K.Y. (1986) Longitudinal data analysis for discrete and continuous outcomes. Biometrics 42, 121-130.
Hardin J.W. and Hilbe J.M. (2013). Generalized Estimating Equations. Chapman & Hall, London.
## Example 1 mod1 <- size ~ poly(days,4) + treat fit1 <- glmgee(mod1, id=tree, family=Gamma("log"), corstr="AR-1", data=spruce) summary(fit1) ## Example 2 mod2 <- depressd ~ visit + group fit2 <- glmgee(mod2, id=subj, family=binomial("logit"), corstr="Exchangeable", data=depression) summary(fit2) ## Example 3 mod3 <- dep ~ visit + group fit3 <- glmgee(mod3, id=subj, corstr="Non-Stationary-M-dependent(2)", data=depression) summary(fit3)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.