Tutorials › Generalized Linear Mixed Models (GLMM) › Independence Working Correlation In GEE

GLMM Versus GEE · Tutorial 131 of 698

Independence Working Correlation In GEE

Specify independence working correlation in GEE and see how cluster-level variance estimation allows inference to reflect within-cluster dependence.

Intermediate 11 min read

What You'll Learn

  • Write the independence working correlation matrix for a cluster of any size.
  • Distinguish an independence working correlation from a claim that outcomes are truly independent.
  • Construct the GEE estimating equation under independence working correlation.
  • Interpret the inverse-marginal-variance weights in that equation.
  • Explain how cluster-level residual contributions enter a robust variance estimate.
  • Recognize conditions and diagnostics relevant to independence-working GEE.

Why Use an Independence Working Correlation?

In clustered or repeated-measures data, observations from the same cluster may be associated. A GEE analysis specifies a marginal mean model and uses a working correlation to organize information within clusters. The independence working correlation is the simplest choice: it treats within-cluster correlations as zero for the working calculation. Crucially, this is a choice about the estimating equation, not necessarily a claim that the observed outcomes are independent.

The distinction matters because the mean model and the dependence model have different jobs. The mean model describes the expected outcome as a function of predictors. The working correlation shapes how residuals within each cluster contribute to estimating the mean-model coefficients. A variance estimate that keeps whole clusters together can still reflect within-cluster dependence even when the working correlation is independence.

Definition: For cluster \(i\), let \(Y_i\) be the vector of observed outcomes, \(\mu_i=E(Y_i)\) the vector of marginal means specified by the mean model, and \(A_i\) the diagonal matrix of marginal variances. A working correlation matrix \(R_i\) specifies the correlations used in the working covariance \(V_i=A_i^{1/2}R_iA_i^{1/2}\). Under the independence working correlation, \(R_i=I\), the identity matrix, so \(V_i=A_i\).

For an outcome with variance function \(v(\mu_{ij})\) and dispersion parameter \(\phi\), the \(j\)th diagonal entry of \(A_i\) is typically \(\phi v(\mu_{ij})\). For a Bernoulli outcome, this variance is \(\mu_{ij}(1-\mu_{ij})\). The marginal means are linked to predictors through the chosen generalized linear model mean structure. The independence working correlation adds no off-diagonal covariance terms to \(V_i\).

The usual GEE conditions include a correctly specified marginal mean model, independent clusters, and a sufficiently large number of clusters for the large-sample variance approximation to be useful. The working covariance must also be usable in the estimating equation; in particular, its required inverses must exist. Independence of clusters is different from independence of observations within a cluster. The latter is not required for the robust, cluster-based variance estimate described below.

The Estimating Equation Under Independence

Let \(\beta\) denote the vector of mean-model coefficients, and let \(D_i=\partial\mu_i/\partial\beta^\mathsf{T}\) be the matrix of derivatives of the mean vector with respect to those coefficients. The GEE estimator solves a sum of cluster contributions equal to zero. With independence working correlation, the equation simplifies because \(V_i=A_i\).

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

Here \(K\) is the number of independent clusters. Each residual component is weighted by the inverse of its marginal variance: a component with a smaller modeled variance receives a larger weight, all else equal. For example, a variance of \(0.25\) corresponds to a diagonal weight of \(1/0.25=4\), not \(0.25\). The derivative matrix \(D_i\) then maps the weighted residual information to the coefficients being estimated.

This is the same mean-model target used by GEE with other working correlations; changing the working correlation changes how within-cluster residuals are combined. Independence is attractive because \(A_i\) is diagonal, so the working calculation is relatively simple, including when cluster sizes differ. It may also be a reasonable approximation if within-cluster associations are weak. But simplicity alone does not make it the best choice for precision.

Worked Example: Writing the Working Matrix

Suppose a hypothetical cluster has three repeated binary outcomes, with fitted marginal means \(0.50\), \(0.40\), and \(0.20\). Under a Bernoulli variance model, the marginal variances are \(\mu_{ij}(1-\mu_{ij})\). The independence working covariance is the diagonal matrix of those variances.

Calculate the diagonal entries. They are \(0.50(0.50)=0.25\), \(0.40(0.60)=0.24\), and \(0.20(0.80)=0.16\). Thus \(A_i=V_i\).

$$ R_i=I_3= \begin{pmatrix} 1&0&0\\ 0&1&0\\ 0&0&1 \end{pmatrix}, \qquad V_i=A_i= \begin{pmatrix} 0.25&0&0\\ 0&0.24&0\\ 0&0&0.16 \end{pmatrix} $$

The zero off-diagonal entries are the independence working assumption. They do not, by themselves, establish that the actual outcomes in this cluster are uncorrelated. If a residual component is multiplied by \(A_i^{-1}\), its corresponding diagonal weights are \(4\), \(4.167\), and \(6.25\), respectively.

Worked Example: A Cluster Contribution to the GEE

Consider a hypothetical two-occasion binary-outcome cluster in an intercept-only logistic mean model. At a current coefficient value, suppose the fitted probabilities are \(0.50\) and \(0.40\), and the observed outcomes are \(1\) and \(0\). The fitted residual vector is therefore \((0.50,-0.40)^\mathsf{T}\). For a logistic intercept, the derivatives of these means with respect to the intercept are their Bernoulli variances, so \(D_i=(0.25,0.24)^\mathsf{T}\).

Under independence working correlation, the cluster's contribution to the scalar estimating equation is

$$ D_i^\mathsf{T}A_i^{-1}(Y_i-\mu_i) = (0.25,0.24) \begin{pmatrix} 4&0\\ 0&1/0.24 \end{pmatrix} \begin{pmatrix} 0.50\\ -0.40 \end{pmatrix} $$

The weighted residuals are \(4(0.50)=2.00\) and \((1/0.24)(-0.40)=-1.667\). Multiplying by the derivatives gives \(0.25(2.00)+0.24(-1.667)=0.500-0.400=0.100\). This is one cluster's contribution, not the complete GEE solution; the coefficient estimate is obtained by finding a value at which contributions across all clusters sum to zero.

This calculation also makes the inverse-variance weighting explicit. In particular, the second residual is multiplied by \(1/0.24\), not by \(0.24\). The marginal variances and derivatives here follow from the stated Bernoulli logistic mean model.

Why Dependence Can Still Enter the Variance

The independence working equation uses diagonal \(A_i^{-1}\) to form each cluster's contribution. A robust variance estimate then treats that entire contribution as one unit when measuring its variability across independent clusters. In a common large-sample form, define \(B=\sum_i D_i^\mathsf{T}A_i^{-1}D_i\). The estimated covariance of the coefficient estimator is

$$ \widehat{\operatorname{Var}}(\hat{\beta}) = B^{-1} \left[ \sum_{i=1}^{K} D_i^\mathsf{T}A_i^{-1} (Y_i-\hat{\mu}_i)(Y_i-\hat{\mu}_i)^\mathsf{T} A_i^{-1}D_i \right] B^{-1} $$

The middle, cluster-level term uses the outer product of the full residual vector. Its off-diagonal entries are products of residuals from different observations in the same cluster. Consequently, the variability calculation does not discard all information about within-cluster co-movement. It allows the observed cluster contributions to reflect that co-movement, even though the working covariance used in the estimating equation was diagonal.

This justification is asymptotic: with a correctly specified marginal mean, independent clusters, and enough clusters, the empirical variation of cluster contributions estimates their true variation without requiring the working correlation to be correct. It does not make the independence working correlation true, and it does not guarantee reliable inference with very few clusters. Nor does it protect against a misspecified mean model or dependence between clusters.

Worked Example: Cluster Contributions and Robust Variance

For a compact numerical illustration, suppose three hypothetical clusters each contain two continuous outcomes. Use an intercept-only identity-link mean model, so the fitted mean is the overall average. For this calculation let the working marginal variance be 1 for each observation, making \(A_i=I_2\) and \(D_i=(1,1)^\mathsf{T}\). The six observed values are \((1,3)\), \((2,4)\), and \((5,7)\).

The fitted mean is \(\hat{\mu}=(1+3+2+4+5+7)/6=22/6=3.667\). With the stated working variance, \(B=\sum_i D_i^\mathsf{T}D_i=3(2)=6\). Each cluster's scalar residual contribution is its sum of residuals:

$$ S_1=(1-3.667)+(3-3.667)=-3.333,\quad S_2=(2-3.667)+(4-3.667)=-1.333,\quad S_3=(5-3.667)+(7-3.667)=4.667 $$

The robust middle term is \(\sum_i S_i^2\). Using unrounded values, the three contributions are \((-10/3)^2=11.111\), \((-4/3)^2=1.778\), and \((14/3)^2=21.778\), which sum to \(34.667\). Therefore the uncorrected sandwich variance estimate for the mean is \(34.667/6^2=0.9630\), with standard error \(\sqrt{0.9630}=0.9813\) outcome units.

For comparison, the model-based variance under the working independence model with variance 1 is \(B^{-1}=1/6=0.1667\), with standard error \(0.4082\) outcome units. This large difference is a warning that the cluster-level residual totals vary substantially. With only three clusters, however, the robust estimate is highly uncertain; this calculation illustrates the mechanics, not a dependable inferential analysis.

Diagnostics, Alternatives, and Limitations

An independence working correlation is easy to specify, but diagnostics should not be skipped. Consider whether the study design makes within-cluster association plausible, and inspect residual patterns by cluster and occasion when those dimensions are meaningful. Large, systematically similar residuals within clusters can indicate that the independence working structure is a poor representation of the dependence. Compare coefficient estimates and standard errors under plausible working structures as a sensitivity check, while keeping the marginal mean model fixed.

The main alternative is to use a non-independence working correlation that represents some within-cluster association. For example, an exchangeable structure uses a common within-cluster correlation, while an AR(1) structure represents correlation that changes with separation in time. More flexible structures may fit dependence more closely, but they introduce additional working parameters and can be harder to estimate. Independence is therefore a useful baseline, especially when clusters are small or a more complex structure is unstable. Choosing among these options is a separate modeling decision, not a test of whether the data are literally independent.

There are important limits. Robust variance estimation relies on independent clusters and large-sample behavior across clusters; many observations inside a small number of clusters do not replace having many independent clusters. If the mean model is wrong, a robust variance estimate does not generally repair the target or remove bias. Independence working correlation can also be inefficient when substantial within-cluster association is present. The estimated coefficients may still target the specified marginal mean under appropriate conditions, but their precision can suffer.

Key takeaway: Independence working correlation sets \(R_i=I\), hence \(V_i=A_i\), and produces a simple GEE with inverse-marginal-variance weights. A cluster-based robust variance estimate can still reflect within-cluster dependence because it uses each cluster's full residual contribution. This protection is asymptotic and depends on independent clusters and a suitable mean model.

Common Mistake

A frequent error is to say that choosing independence working correlation proves, or requires, that outcomes within a cluster are independent. It does neither: it sets the off-diagonal working correlations to zero in the estimating equation. Another error is to multiply residuals by their marginal variances; the GEE equation uses their inverse marginal variances through \(A_i^{-1}\). The robust variance calculation then keeps residuals grouped by cluster rather than treating all observations as unrelated.

Check Your Understanding

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

  1. A cluster has three outcomes with marginal variances \(0.20\), \(0.25\), and \(0.10\). What is its independence working covariance matrix, and what is the inverse-variance weight for the third residual?
  2. Does specifying \(R_i=I\) establish that the observed outcomes within each cluster are truly independent? Explain.
  3. In one cluster, a residual is \(-0.12\) and its marginal variance is \(0.30\). What value does the inverse-variance weighting produce for this residual component before multiplication by its derivative?
  4. Why can a robust variance estimate account for within-cluster dependence when the working correlation is independence?
  5. Name two conditions important to the large-sample justification for robust GEE inference, and state one limitation when they are not credible.

Solutions. (1) \(V_i=A_i=\operatorname{diag}(0.20,0.25,0.10)\). The third weight is \(1/0.10=10\). (2) No. The identity matrix specifies zero working correlations for the estimating equation; it does not assert that the actual within-cluster correlations are zero. (3) The weighted residual is \((-0.12)/0.30=-0.400\). (4) The robust variance uses an outer product of the full residual vector for each cluster, preserving cross-products between residuals within that cluster. (5) Examples are a correctly specified marginal mean model and independent clusters, with enough clusters for the large-sample approximation. With few clusters, the robust variance approximation may be unreliable even if each cluster contains many observations.

Clinical Biostats