Tutorials › Generalized Linear Mixed Models (GLMM) › Mean Models And Dependence Models In GEE

GLMM Versus GEE · Tutorial 129 of 698

Mean Models And Dependence Models In GEE

Learn to specify the marginal mean and working correlation as distinct parts of GEE, and trace their different roles in estimation and inference.

Intermediate 12 min read

What You'll Learn

  • Define a GEE marginal mean model using a link, predictors, and regression parameters.
  • Distinguish the marginal variance from the working correlation used to represent within-cluster dependence.
  • Interpret the GEE estimating equation and explain how the working covariance weights residuals.
  • Identify conditions needed for reliable estimation and inference.
  • Recognize diagnostics and common errors that arise when mean and dependence specifications are conflated.

Two Specifications, Two Jobs

In clustered or repeated-measures data, observations from the same cluster are generally dependent. Generalized estimating equations (GEE) address this setting by separating two modeling choices: the marginal mean model, which describes the expected outcome as a function of predictors, and the working correlation model, which represents dependence among observations within a cluster for purposes of estimation. They are related in the estimating procedure, but they are not interchangeable.

This separation matters because the mean model defines the regression relationship of interest. The working correlation helps determine how residual information from a cluster contributes to estimating that relationship and its uncertainty. The working correlation is called “working” because it need not be the true correlation structure for GEE to estimate a correctly specified marginal mean consistently under suitable conditions.

Definition: For cluster \(i\), let \(Y_i=(Y_{i1},\ldots,Y_{in_i})^\mathsf{T}\) be the outcome vector, and let \(\mu_{ij}=E(Y_{ij}\mid X_i)\) be the marginal mean for observation \(j\), given the observed predictors \(X_i\). A GEE mean model specifies \(g(\mu_{ij})=x_{ij}^\mathsf{T}\beta\), where \(g\) is a link function, \(x_{ij}\) is the predictor vector, and \(\beta\) is the regression parameter vector. A working dependence model specifies a convenient within-cluster correlation matrix used to construct the estimating equation; it does not, by itself, specify the marginal means.

Mean, Variance, and Working Correlation

The mean model states how the expected outcome changes with predictors on the scale determined by the link. For example, with a binary outcome, a logit link can specify the log odds of the marginal probability; with a count outcome, a log link can specify the log marginal mean. The coefficients describe these marginal relationships, as discussed in the earlier material on population-averaged mean models in GEE.

To form an estimating equation, GEE also represents the outcome variability within each cluster. Let \(A_i\) be a diagonal matrix whose \(j\)th diagonal entry is the variance-function value for observation \(j\), typically \(\phi v(\mu_{ij})\), where \(v\) is the chosen variance function and \(\phi\) is a scale parameter when appropriate. Let \(R_i(\alpha)\) be a working correlation matrix, potentially depending on nuisance parameter(s) \(\alpha\). The working covariance matrix is

$$ V_i=A_i^{1/2}R_i(\alpha)A_i^{1/2}. $$

Thus, the marginal mean determines the \(\mu_{ij}\) values and hence the variance-function terms in \(A_i\). The working correlation contributes the off-diagonal dependence representation in \(R_i(\alpha)\). Together they define \(V_i\), which weights the residual vector in the GEE. This connection does not make the two specifications identical: changing the mean formula changes the proposed expected outcomes; changing \(R_i(\alpha)\) changes how residuals are weighted and how uncertainty is calculated.

Write \(\mu_i=(\mu_{i1},\ldots,\mu_{in_i})^\mathsf{T}\), and let \(D_i=\partial\mu_i/\partial\beta^\mathsf{T}\) be the matrix of derivatives of the mean vector with respect to the regression parameters. The GEE for \(\beta\) is

$$ \sum_{i=1}^{m}D_i^\mathsf{T}V_i^{-1}(Y_i-\mu_i)=0. $$

The cluster residual vector \(Y_i-\mu_i\) is transformed by the inverse working covariance and then related to changes in the fitted means through \(D_i\). This is a weighted estimating equation, not a statement that the full joint distribution of \(Y_i\) has been specified.

1
Specify the marginal mean.
Choose the outcome scale, predictors, link \(g\), and regression parameters \(\beta\). This defines the population-averaged relationship being estimated.
2
Represent variability and dependence.
Use the mean and variance function to form \(A_i\), and choose a working \(R_i(\alpha)\) to represent within-cluster association for weighting.
3
Solve the estimating equation.
Estimate \(\beta\) by finding values that balance the covariance-weighted residual contributions across clusters.

Why the Working Covariance Changes the Calculation

A short derivation shows the role of the working covariance. In the special case of an identity link and a linear mean \(\mu_i=X_i\beta\), \(D_i=X_i\). If the working covariance is treated as fixed while solving for \(\beta\), the estimating equation becomes

$$ \sum_i X_i^\mathsf{T}V_i^{-1}(Y_i-X_i\beta)=0. $$

Rearranging gives

$$ \left(\sum_i X_i^\mathsf{T}V_i^{-1}X_i\right)\beta = \sum_i X_i^\mathsf{T}V_i^{-1}Y_i. $$

The matrix \(V_i^{-1}\) determines the weight assigned to different residual directions within a cluster. If it changes, the solution can change when the data and design make those directions contribute differently. In some special designs the estimate stays the same, even though the weighting has changed; one should not assume that a different working correlation must change every finite-sample estimate.

Worked Example: A Working Correlation Changes an Intercept Estimate

Suppose hypothetical continuous outcomes follow an identity-link marginal mean model with an intercept only, so \(\mu_{ij}=\beta\). There are two independent clusters. Cluster 1 has one outcome, \(Y_1=(0)\); cluster 2 has two outcomes, \(Y_2=(0,10)^\mathsf{T}\). For this calculation, take the marginal variance to be 1. Compare working independence with a working correlation of \(\rho=0.5\) for the two observations in cluster 2.

Under working independence, \(V_i\) is the identity matrix. The estimating equation is the sum of residuals, so

$$ (0-\beta)+(0-\beta)+(10-\beta)=0 \quad\Longrightarrow\quad \hat{\beta}_{\mathrm{ind}}=\frac{10}{3}=3.333. $$

For cluster 2 under the specified correlated working model,

$$ R_2= \begin{pmatrix} 1&0.5\\ 0.5&1 \end{pmatrix}, \qquad R_2^{-1}= \begin{pmatrix} 4/3&-2/3\\ -2/3&4/3 \end{pmatrix}. $$

The cluster 2 contribution to the intercept equation is \(\mathbf{1}^\mathsf{T}R_2^{-1}(Y_2-\beta\mathbf{1})\). Since \(\mathbf{1}^\mathsf{T}R_2^{-1}=(2/3,2/3)\), this is \((2/3)(10-2\beta)\). Cluster 1 contributes \(0-\beta\). Therefore,

$$ -\beta+\frac{2}{3}(10-2\beta)=0 \quad\Longrightarrow\quad -\frac{7}{3}\beta+\frac{20}{3}=0 \quad\Longrightarrow\quad \hat{\beta}_{\mathrm{corr}}=\frac{20}{7}=2.857. $$

Here the working correlation changes the finite-sample estimate because it changes the contribution of the two-observation cluster relative to the one-observation cluster. Both estimates are calculated from the same outcomes and the same intercept-only mean formula; only the working covariance differs. This calculation demonstrates a possible effect, not a universal one. In applications with a link other than the identity, the GEE is generally solved iteratively rather than by this linear rearrangement.

What the Working Model Does—and Does Not—Claim

The working correlation is a device for representing within-cluster dependence in the estimating equation. It is not an additional predictor effect, and it does not define a separate mean for each pair of observations. Nor does a chosen working correlation alone assert that the joint distribution of outcomes is exactly correct. GEE targets the specified marginal mean while using the working covariance to organize the information in correlated observations.

Under standard regularity conditions, the central consistency argument is that the mean residual has expectation zero when the marginal mean is correctly specified. In particular, if clusters are independent and \(E(Y_i-\mu_i\mid X_i)=0\), then for a nonrandom working covariance conditional on the predictors,

$$ E\left\{D_i^\mathsf{T}V_i^{-1}(Y_i-\mu_i)\mid X_i\right\} = D_i^\mathsf{T}V_i^{-1}E(Y_i-\mu_i\mid X_i)=0. $$

Consequently, a working covariance that is not the true covariance need not introduce bias into the estimating equation’s population target, provided the mean is correct and the weighting is well behaved. Consistency and valid large-sample inference also require suitable conditions such as independent clusters, an identifiable and sufficiently informative design, finite moments, and enough independent clusters. A poor working model can reduce efficiency, and incorrect assumptions about the mean are not repaired by choosing a more elaborate working correlation.

Worked Example: A Weighted Residual Is Not a New Mean

Consider one hypothetical cluster of two observations with fitted marginal means \(\mu_i=(4,4)^\mathsf{T}\) and observed outcomes \(Y_i=(6,3)^\mathsf{T}\). The residual vector is therefore \(r_i=(2,-1)^\mathsf{T}\). Suppose the variance is 1 for both observations and use a working correlation of \(0.5\).

Under working independence, the intercept-equation contribution is the sum of the residuals, \(2+(-1)=1\). With the correlated working matrix from the previous example, the weighted residual is

$$ R_i^{-1}r_i = \begin{pmatrix} 4/3&-2/3\\ -2/3&4/3 \end{pmatrix} \begin{pmatrix} 2\\ -1 \end{pmatrix} = \begin{pmatrix} 10/3\\ -8/3 \end{pmatrix}. $$

For an intercept, the cluster contribution is the sum of these transformed residuals, \(10/3-8/3=2/3\). The working correlation has changed the residual contribution from \(1\) to \(2/3\). It has not changed either fitted marginal mean of 4, and it has not created a new mean model. This distinction is essential when interpreting the fitted regression coefficients.

Assumptions, Diagnostics, and Alternatives

The key assumption for the mean target is that the chosen predictors and link correctly describe the marginal means. The estimating procedure also relies on clusters being independent sampling units; dependence within a cluster is the feature being represented. The working covariance matrices must be valid for the calculations, in particular invertible (or handled with an appropriate method), and the predictor design must contain enough information to identify the parameters. The independent-cluster asymptotic argument is not a guarantee of good small-sample performance.

Diagnostics should therefore examine both specifications separately. Check whether fitted means and residual patterns suggest omitted predictors, a poor link, or systematic changes over time or across predictor values. Separately assess whether the working dependence representation appears plausible and whether the algorithm converges to stable estimates. Nonconvergence, extreme parameter estimates, or an invalid working correlation matrix can indicate a computational or specification problem. Residual dependence does not by itself prove that the mean is wrong, just as a plausible correlation pattern does not validate the mean.

A common mistake is to reason, “The working correlation is wrong, so the marginal regression coefficients must be biased.” That conclusion is too strong. With a correctly specified marginal mean and the required regularity conditions, a misspecified working correlation can leave the estimating equation centered at the right mean parameter, although it may affect efficiency and the accuracy of model-based uncertainty calculations. The reverse mistake is equally serious: a well-chosen working correlation cannot rescue a misspecified mean. Appropriate variance estimation is therefore important; the sandwich variance and its small-sample concerns are treated separately in later material.

The principal alternative in this course is the generalized linear mixed model (GLMM), whose mean is specified conditionally on random effects rather than directly as a population-averaged mean. GEE directly specifies the marginal mean and uses a working covariance for estimation. A GLMM instead models latent cluster-level variation as part of its conditional structure. These approaches answer different questions and rely on different modeling assumptions; a working correlation in GEE should not be interpreted as though it were a random effect.

Key takeaway: In GEE, the marginal mean model defines the regression target. The working correlation enters through the working covariance, influencing how residuals contribute to estimation and inference. Keep these roles distinct when specifying, diagnosing, and interpreting a model.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. In \(g(\mu_{ij})=x_{ij}^\mathsf{T}\beta\), which part specifies the marginal mean relationship, and which part of GEE represents within-cluster association for weighting?
  2. If the marginal mean model is correct but the working correlation is not the true correlation, does that automatically imply biased GEE regression estimates? State the key qualifications.
  3. With an identity link and intercept only, suppose three independent observations have outcomes \(2,4,6\), and the working covariance is identity. Calculate the GEE estimate of the intercept.
  4. For a two-observation cluster with residual vector \((1,1)^\mathsf{T}\), unit variances, and working correlation \(0.5\), calculate the intercept-equation contribution under that working correlation.

Solutions. (1) The link, predictors, and \(\beta\) specify the marginal mean; \(R_i(\alpha)\), combined with the marginal variance terms in \(A_i\), supplies the working covariance for weighting. (2) No. Under a correctly specified mean, independent clusters, valid and well-behaved weights, identifiability, and suitable large-sample conditions, misspecifying the working correlation need not bias the mean estimate, though it can affect efficiency and inference. (3) The intercept equation is \((2-\beta)+(4-\beta)+(6-\beta)=0\), so \(3\hat{\beta}=12\) and \(\hat{\beta}=4\) outcome units. (4) With \(R^{-1}=\begin{pmatrix}4/3&-2/3\\-2/3&4/3\end{pmatrix}\), the weighted residual is \((2/3,2/3)^\mathsf{T}\); summing its entries gives an intercept-equation contribution of \(4/3\).

Clinical Biostats