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

GLMM Versus GEE · Tutorial 141 of 698

Misspecified Mean Models In GEE And GLMM

Distinguish mean-model errors from dependence-model errors, and learn what robust GEE variance can—and cannot—protect.

Intermediate 10 min read

What You'll Learn

  • Define mean-model misspecification for marginal GEE and conditional GLMM models.
  • Explain why a sandwich variance addresses uncertainty, not systematic mean-model error.
  • Derive the population estimating equation and its pseudo-true target.
  • Calculate how omitted curvature and working-correlation weights can change fitted coefficients.
  • Use residual patterns to distinguish mean errors from dependence errors.
  • Compare mean-model revision with changing the working correlation.

Two Different Parts of a Clustered-Data Model

A clustered-data analysis has to describe both the expected outcome and the dependence among outcomes from the same cluster. These are separate modelling tasks. The mean model specifies how covariates relate to the expected outcome; the dependence model describes how outcomes within a cluster vary together after accounting for that mean. Confusing the two matters because a correction aimed at one does not generally repair an error in the other.

In GEE, the mean model is usually marginal: it describes the expected outcome given observed covariates, averaging over unobserved cluster-level variation. A working correlation is used to construct the estimating equation. In a GLMM, a conditional mean is specified given random effects, along with a model for those effects. The interpretations of GEE and GLMM coefficients can therefore differ; neither approach makes an incorrect mean relationship correct.

Definition: A mean-model misspecification occurs when the assumed relationship between covariates and the relevant expected outcome cannot represent the true relationship. A dependence-model misspecification occurs when the assumed within-cluster covariance or correlation structure is incorrect, while the specified mean relationship may still be correct.

For example, omitting a quadratic predictor term can misspecify the mean even if the working correlation is exactly right. Conversely, a correct mean model can be paired with an independence working correlation even when outcomes within clusters are correlated. The latter can affect efficiency and model-based standard errors; it does not, by itself, imply a wrong mean.

What the GEE Estimating Equation Targets

Let \(Y_i\) be the outcome vector for cluster \(i\), and let \(X_i\) denote its covariates. A marginal mean model writes \(\mu_i(\beta)=E(Y_i\mid X_i)\), with a specified link relating that mean to predictors. Let \(D_i=\partial\mu_i(\beta)/\partial\beta^\mathsf{T}\), and let \(V_i\) be the working covariance used in the GEE. The estimate solves:

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

Here \(K\) is the number of independent clusters. If the mean model is correct and standard regularity conditions hold, the estimating equation has expectation zero at the true mean parameter, even if \(V_i\) does not equal the true covariance. This is the basis for GEE's robustness to working-correlation misspecification. It does not mean that the estimate is immune to a wrong mean model.

Suppose instead that the true marginal mean is \(\mu_i^0\), which is not represented by any \(\mu_i(\beta)\) in the fitted model. The large-sample target, when it exists, is a pseudo-true value \(\beta^\ast\) satisfying the population estimating equation:

$$ E\!\left[D_i^\mathsf{T}V_i^{-1}\{Y_i-\mu_i(\beta^\ast)\}\right]=0. $$

This value describes a particular weighted approximation to the true mean, not necessarily a scientifically intended coefficient. Its value can depend on the covariate distribution and, when the mean is wrong, on the working covariance weights.

Why a Sandwich Variance Does Not Repair the Mean

The sandwich variance estimates the sampling variability of an estimator around its large-sample target. For a correctly specified mean, this target is generally the true mean parameter. With a misspecified mean, the target may instead be \(\beta^\ast\). The robust variance can account for variability in the cluster-level estimating contributions, but it does not change those contributions' expected value or make the fitted mean equal the true mean.

To see the distinction, define \(A\) as the negative expected derivative of the estimating equation per cluster at its target and \(B\) as the variance of the cluster-level estimating contribution there. Under appropriate independence, moment, and regularity conditions, the asymptotic covariance has the sandwich form:

$$ \operatorname{Var}(\hat{\beta})\ \approx\ \frac{1}{K}A^{-1}BA^{-\mathsf{T}}. $$

This form allows the covariance calculation to reflect the observed variation of the cluster contributions rather than relying entirely on the working covariance. But it is a variance around the estimator's target. A narrow confidence interval around a pseudo-true value can be precise and still describe the wrong mean relationship.

Key takeaway: A robust GEE variance can protect standard errors against certain covariance-model errors when the mean model and other estimating assumptions are adequate. It does not correct omitted predictors, an unsuitable link, a wrong functional form, or a wrong interaction structure.

Worked Mean-Model Misspecification

Worked Example: Fitting a Straight Line to Curvature

Suppose hypothetical independent clusters have covariate values \(x=0,1,2\), with equal representation at each value. Their true marginal mean outcomes, in outcome units, are \(10,14,22\). Fit an identity-link linear mean model \(\mu(x)=\beta_0+\beta_1x\), using equal weights. The pattern is curved, so the straight-line mean model is misspecified.

The population least-squares equations set the sum of residuals and the covariate-weighted sum of residuals to zero. For these three equally represented covariate values, they are:

$$ 46-3\beta_0-3\beta_1=0,\qquad 58-3\beta_0-5\beta_1=0. $$

The first equation uses \(10+14+22=46\). The second uses \(0(10)+1(14)+2(22)=58\). Subtracting the first equation from the second gives \(2\beta_1=12\), so \(\hat{\beta}_1=6\); then \(\hat{\beta}_0=(46-3\cdot6)/3=28/3\approx9.333\).

The fitted means are \(9.333,\ 15.333,\ 21.333\). Subtracting these from the true means gives residuals \(0.667,\ -1.333,\ 0.667\). Their sum is \(0.667-1.333+0.667\approx0\), and their covariate-weighted sum is \(0(0.667)+1(-1.333)+2(0.667)\approx0\). The fitted line satisfies its estimating equations, but the residual pattern shows the model's systematic lack of fit. A robust variance would not make the fitted middle mean of \(15.333\) agree with the true mean of \(14\).

Correlation Weights Can Change a Misspecified Target

When a mean model is correct, using a different valid working correlation generally changes efficiency, not the population mean target. With a wrong mean, however, the GEE weights can determine which parts of the true mean pattern receive more influence. The following example shows this directly.

Worked Example: A Common Mean with Different Cluster Sizes

Imagine a hypothetical population with equal numbers of two cluster types. Each small cluster has one outcome with mean 0; each large cluster has two outcomes, both with mean 10. Fit the misspecified model of one common mean, using a Gaussian identity-link GEE with the same variance scale for every observation. For an exchangeable working correlation with size \(m\), the contribution to the intercept equation has weight \(m/\{1+(m-1)\rho\}\), where \(\rho\) is the working correlation.

With independence working correlation, \(\rho=0\), the small-cluster weight is 1 and the large-cluster weight is 2. The pseudo-target is the weighted average:

$$ \beta^\ast=\frac{1(0)+2(10)}{1+2}=\frac{20}{3}\approx6.667. $$

Now use \(\rho=0.5\). The small-cluster weight remains 1, while the large-cluster weight is \(2/\{1+(2-1)(0.5)\}=4/3\). The resulting target is:

$$ \beta^\ast=\frac{1(0)+(4/3)(10)}{1+4/3} =\frac{40/3}{7/3}=\frac{40}{7}\approx5.714. $$

Both fitted models impose a common mean even though the cluster types have different true means. Changing the working correlation changes the weighted compromise from about 6.667 to 5.714 outcome units. A sandwich variance may estimate uncertainty around either target under suitable conditions; it does not make either target the two type-specific means.

Mean Misspecification in a GLMM

A GLMM specifies a conditional mean given random effects. In a general notation, this can be written \(g\{E(Y_{ij}\mid b_i,X_{ij})\}=X_{ij}\beta+Z_{ij}b_i\), where \(b_i\) is the cluster's random effect. A conditional mean model is misspecified if its predictor structure or link fails to represent the true conditional mean. For example, omitting a curved covariate effect from the conditional predictor can leave systematic conditional residual patterns.

A GLMM is not automatically protected from this error because it includes random effects. Random effects represent specified sources of cluster-level variation; they do not generally substitute for a missing covariate effect. Likewise, changing the random-effects covariance structure does not, by itself, correct a wrong conditional mean. For nonlinear links, the marginal mean obtained by averaging over random effects is generally not just the inverse link applied to \(X_{ij}\beta\). Thus, diagnose the conditional mean you fitted and be clear about which mean your scientific question concerns.

Worked Example: A Misspecified Conditional Trend

Consider hypothetical continuous outcomes generated by a Gaussian random-intercept model whose fixed-effect component has means \(10,14,22\) at \(x=0,1,2\), respectively. Given random intercept \(b_i\), the conditional means are \(10+b_i,14+b_i,22+b_i\); if \(E(b_i)=0\), the marginal means are \(10,14,22\). Suppose each cluster is measured at all three \(x\) values, and the fitted GLMM instead uses a linear conditional mean \(\beta_0+\beta_1x+b_i\). The omitted curvature means the conditional mean is misspecified.

With the balanced three-value design, the linear fixed-effect component has the same projection calculated above: \(\hat{\beta}_0=28/3\approx9.333\) and \(\hat{\beta}_1=6\). Its fitted conditional fixed-effect means are \(9.333,\ 15.333,\ 21.333\), leaving systematic deviations of approximately \(0.667,\ -1.333,\ 0.667\) across the three covariate values. A random intercept shifts all three fitted means for a cluster together; it cannot remove this across-\(x\) curvature pattern. The appropriate remedy is to reconsider the conditional mean structure, for example by representing curvature, not merely to alter the random-intercept variance.

Diagnostics, Alternatives, and Limitations

Diagnostics should look for patterns in the mean as well as dependence. For GEE, examine residual averages across covariate values, visits, or scientifically important subgroups; persistent positive residuals in one range and negative residuals in another can indicate a missing trend or interaction. For a GLMM, examine whether residual patterns remain after accounting for the fitted conditional structure, and distinguish conditional from marginal checks. Residual correlation can suggest a dependence problem, but visible within-cluster association alone does not establish that the mean is correct.

Observed concernLikely modelling questionPotential next step
Residual means vary systematically with a predictorIs the mean functional form or link adequate?Consider a justified nonlinear term, interaction, or alternative link.
Residuals have within-cluster association but no clear mean patternIs the dependence representation adequate for efficiency or model-based inference?Consider a different working correlation or covariance structure.
Both patterns remainCould both model components be inadequate?Revisit the mean and dependence specifications separately.

The alternatives address different questions. In GEE, changing the working correlation can improve efficiency when the mean model is adequate; it is not a general cure for a wrong marginal mean. Adding defensible covariate terms or revising the link addresses the mean specification, but should be guided by the design and scientific question rather than chosen solely to improve a fit statistic. A GLMM and a GEE also target conditional and marginal relationships, respectively, in general. Switching between them does not guarantee that the chosen mean is correctly specified.

The sandwich argument also has limits: it relies on independent clusters and adequate large-sample conditions, including enough clusters for reliable variance estimation. Robustness of the variance is not a guarantee against informative cluster size, dependence between clusters, or errors in the outcome and covariate data. Those issues require separate consideration. Most importantly here, even with many clusters and a well-estimated sandwich variance, a misspecified mean can still produce a misleading coefficient and fitted values.

A Practical Separation of Checks

1
State the target mean.
Clarify whether the model describes a marginal mean, as in GEE, or a conditional mean given random effects, as in a GLMM.
2
Check the mean structure.
Look for systematic residual patterns across predictors, visits, and relevant subgroups; assess whether the specified link and predictor terms are plausible.
3
Check dependence separately.
Assess whether the within-cluster covariance representation is plausible for the intended inference and efficiency goals.
4
Interpret uncertainty around the right target.
A robust standard error concerns sampling variability; it does not validate the mean model or convert a pseudo-target into the intended parameter.

A common mistake is to reason, “I used robust standard errors, so my GEE results are safe even though I omitted a nonlinear predictor.” The correction is that robust standard errors address variance estimation under specified conditions, while the omitted term can shift the coefficient's target and make the fitted mean systematically wrong. Check and justify the mean model independently of the standard-error method.

Check Your Understanding

Answer each question, then compare with the brief solutions below.

  1. A GEE has the correct marginal mean but uses independence working correlation despite within-cluster association. Is this necessarily mean-model misspecification?
  2. A fitted GEE omits a quadratic term, and the sandwich standard error is used. What does the sandwich variance correct, and what does it not correct?
  3. In the exchangeable-correlation example, what is the large-cluster weight when \(\rho=0.25\)?
  4. Why might changing the working correlation change the coefficient target when the mean model is wrong?
  5. Why can a random intercept fail to correct a curved predictor relationship in a GLMM?

Solutions. (1) No. The mean can be correct while the working correlation is wrong; the latter can affect efficiency and model-based variance. (2) The sandwich estimates sampling variability around the estimator's target under appropriate conditions; it does not restore the omitted curvature or guarantee that the target is the intended mean parameter. (3) For \(m=2\), the weight is \(2/\{1+(2-1)(0.25)\}=2/1.25=1.6\). (4) With a wrong mean, different covariance weights give different influence to residuals from different clusters or covariate patterns, changing the weighted approximation solved by the estimating equation. (5) A random intercept shifts the conditional mean for an entire cluster; it does not generally represent a systematic change in the predictor's effect across its values.

Clinical Biostats