| Title: | Generalized Estimation Equation Solver |
| Version: | 4.13-29 |
| Depends: | stats |
| Suggests: | MASS |
| Date: | 2024-12-10 |
| DateNote: | Gee version 1998-01-27 |
| Description: | Generalized Estimation Equation solver. |
| License: | GPL-2 |
| NeedsCompilation: | yes |
| Packaged: | 2024-12-10 15:20:40 UTC; ripley |
| Author: | Vincent J Carey [aut], Thomas S Lumley [trl] (R port of versions 3.13 and 4.4), Cleve Moler [ctb] (LINPACK routines in src/d*), Brian Ripley [trl, cre, ctb] (R port of version 4.13 and updates) |
| Maintainer: | Brian Ripley <Brian.Ripley@R-project.org> |
| Repository: | CRAN |
| Date/Publication: | 2024-12-11 10:04:11 UTC |
Function to solve a Generalized Estimation Equation Model
Description
Produces an object of class"gee" which is a Generalized Estimation Equation fit of the data.
Usage
gee(formula, id, data, subset, na.action, R = NULL, b = NULL, tol = 0.001, maxiter = 25, family = gaussian, corstr = "independence", Mv = 1, silent = TRUE, contrasts = NULL, scale.fix = FALSE, scale.value = 1, v4.4compat = FALSE)Arguments
formula | a formula expression as for other regression models, of the form |
id | a vector which identifies the clusters. The length of |
data | an optional data frame in which to interpret the variables occurringin the |
subset | expression saying which subset of the rows of the data should be usedin the fit. This can be a logical vector (which is replicated to havelength equal to the number of observations), or a numeric vectorindicating which observation numbers are to be included, or acharacter vector of the row names to be included.All observations are included by default. |
na.action | a function to filter missing data. For |
R | a square matrix of dimension maximum cluster size containing the userspecified correlation. This is only appropriate if |
b | an initial estimate for the parameters. |
tol | the tolerance used in the fitting algorithm. |
maxiter | the maximum number of iterations. |
family | a |
corstr | a character string specifying the correlation structure.The following are permitted: |
Mv | When |
silent | a logical variable controlling whether parameter estimates at eachiteration are printed. |
contrasts | a list giving contrasts for some or all of the factors appearingin the model formula. The elements of the list should have thesame name as the variable and should be either a contrast matrix(specifically, any full-rank matrix with as many rows as there arelevels in the factor), or else a function to compute such a matrixgiven the number of levels. |
scale.fix | a logical variable; if true, the scale parameter is fixed atthe value of |
scale.value | numeric variable giving the value to which the scale parametershould be fixed; used only if |
v4.4compat | logical variable requesting compatibility of correlationparameter estimates with previous versions; the currentversion revises to be more faithful to the Liang and Zeger (1986)proposals (compatible with the Groemping SAS macro, version 2.03) |
Details
Though input data need not be sorted by the variablenamed"id", the programwill interpret physically contiguous records possessing thesame value ofid as members of the same cluster. Thus itis possible to use the following vector as anid vectorto discriminate 4 clusters of size 4:c(0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1).
Value
An object of class"gee" representing the fit.
Side Effects
Offsets must be specified in the model formula, as inglm.
Note
This is version 4.8 of this user documentation file, revised98/01/27. The assistance of Dr B Ripley is gratefully acknowledged.
References
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.
See Also
Examples
data(warpbreaks)## marginal analysis of random effects model for woolsummary(gee(breaks ~ tension, id=wool, data=warpbreaks, corstr="exchangeable"))## test for serial correlation in blockssummary(gee(breaks ~ tension, id=wool, data=warpbreaks, corstr="AR-M", Mv=1))if(require(MASS)) {data(OME)## not fully appropriate link for these data.(fm <- gee(cbind(Correct, Trials-Correct) ~ Loud + Age + OME, id = ID, data = OME, family = binomial, corstr = "exchangeable"))summary(fm)}