# Generalized estimating equation

In statistics, a generalized estimating equation (GEE) is used to estimate the parameters of a generalized linear model with a possible unmeasured correlation between observations from different timepoints.
Regression beta coefficient estimates from the Liang-Zeger GEE are consistent, unbiased, and asymptotically normal even when the working correlation is misspecified, under mild regularity conditions. GEE is higher in efficiency than generalized linear models (GLMs) in the presence of high autocorrelation. When the true working correlation is known, consistency does not require the assumption that missing data is missing completely at random. Huber-White standard errors improve the efficiency of Liang-Zeger GEE in the absence of serial autocorrelation but may remove the marginal interpretation. GEE estimates the average response over the population ("population-averaged" effects) with Liang-Zeger standard errors, and in individuals using Huber-White standard errors, also known as "robust standard error" or "sandwich variance" estimates. Huber-White GEE was used since 1997, and Liang-Zeger GEE dates to the 1980s based on a limited literature review. Several independent formulations of these standard error estimators contribute to GEE theory. Placing the independent standard error estimators under the umbrella term "GEE" may exemplify abuse of terminology.
GEEs belong to a class of regression techniques that are referred to as semiparametric because they rely on specification of only the first two moments. They are a popular alternative to the likelihood-based generalized linear mixed model which is more at risk for consistency loss at variance structure specification. The trade-off of variance-structure misspecification and consistent regression coefficient estimates is loss of efficiency, yielding inflated Wald test p-values as a result of higher variance of standard errors than that of the most optimal. They are commonly used in large epidemiological studies, especially multi-site cohort studies, because they can handle many types of unmeasured dependence between outcomes.

## Formulation

Given a mean model $\mu _{ij}$ for subject $i$ and time $j$ that depends upon regression parameters $\beta _{k}$, and variance structure, $V_{i}$, the estimating equation is formed via:
    $U(\beta )=\sum _{i=1}^{N}{\frac {\partial \mu _{i}}{\partial \beta }}V_{i}^{-1}\{Y_{i}-\mu _{i}(\beta )\}\,\!$
The parameters $\beta _{k}$ are estimated by solving $U(\beta )=0$ and are typically obtained via the Newton–Raphson algorithm. The variance structure is chosen to improve the efficiency of the parameter estimates. The Hessian of the solution to the GEEs in the parameter space can be used to calculate robust standard error estimates. The term "variance structure" refers to the algebraic form of the covariance matrix between outcomes, Y, in the sample. Examples of variance structure specifications include independence, exchangeable, autoregressive, stationary m-dependent, and unstructured. The most popular form of inference on GEE regression parameters is the Wald test using naive or robust standard errors, though the Score test is also valid and preferable when it is difficult to obtain estimates of information under the alternative hypothesis. The likelihood ratio test is not valid in this setting because the estimating equations are not necessarily likelihood equations. Model selection can be performed with the GEE equivalent of the Akaike Information Criterion (AIC), the quasi-likelihood under the independence model criterion (QIC).

### Relationship with Generalized Method of Moments

The generalized estimating equation is a special case of the generalized method of moments (GMM). This relationship is immediately obvious from the requirement that the score function satisfy the equation:$\mathbb {E} [U(\beta )]={1 \over {N}}\sum _{i=1}^{N}{\frac {\partial \mu _{i}}{\partial \beta }}V_{i}^{-1}\{Y_{i}-\mu _{i}(\beta )\}\,\!=0$

## Computation

Software for solving generalized estimating equations is available in MATLAB, SAS (proc genmod), SPSS (the gee procedure), Stata (the xtgee command), R (packages glmtoolbox, gee, geepack and multgee), Julia (package GEE.jl) and Python (package statsmodels).
Comparisons among software packages for the analysis of binary correlated data and ordinal correlated data via GEE are available.