Tutorials › Generalized Linear Models › Exchangeable GEE Contributions for Repeated Measures

Generalized Estimating Equations · Tutorial 842 of 981

Exchangeable GEE Contributions for Repeated Measures

Learn how exchangeable working correlation changes each cluster’s contribution to the GEE by coupling its standardized residuals.

Advanced 11 min read

What You'll Learn

  • Write the exchangeable working correlation matrix for a cluster and state when it is positive definite
  • Derive its inverse and identify how the inverse acts on standardized residuals
  • Express a cluster’s GEE contribution using the exchangeable working correlation
  • Calculate contributions for Gaussian and binary repeated-measures examples
  • Explain why exchangeable weighting changes residual contributions without specifying the marginal mean

Why Exchangeable Weighting Changes a Cluster Contribution

In a generalized estimating equation, a cluster contributes a weighted combination of its observed-minus-mean residuals. Under an independence working correlation, each repeated-measure residual is weighted separately. An exchangeable working correlation instead assigns the same working correlation to every pair of distinct observations in a cluster. Its inverse therefore makes each residual’s contribution depend on the other residuals in that cluster.

The correlation assumption concerns the weighting used in the estimating equation. It does not, by itself, change the specified marginal means. The derivation below makes the coupling explicit and shows how to calculate it.

Exchangeable Working Correlation and Covariance

Let cluster \(i\) contain \(n_i\) responses, collected in the vector \(Y_i\), with marginal mean vector \(\mu_i=E[Y_i]\). Let \(A_i\) be the diagonal matrix of marginal variance functions, with diagonal entries \(v(\mu_{ij})\). With dispersion parameter \(\phi>0\), an exchangeable working covariance is

$$ V_i=\phi A_i^{1/2}R_i(\rho)A_i^{1/2}, \qquad R_i(\rho)=(1-\rho)I_{n_i}+\rho \mathbf{1}_{n_i}\mathbf{1}_{n_i}^{T}. $$

Here \(I_{n_i}\) is the \(n_i\)-dimensional identity matrix, \(\mathbf{1}_{n_i}\) is the vector of \(n_i\) ones, and \(\rho\) is the common working correlation for distinct responses within the cluster. The diagonal entries of \(R_i(\rho)\) equal 1 and its off-diagonal entries equal \(\rho\). Thus, the working covariance between responses \(j\) and \(k\) is \(\phi\rho\sqrt{v(\mu_{ij})v(\mu_{ik})}\) when \(j\ne k\).

Definition: An exchangeable working correlation matrix of size \(n_i\) has entries \(R_{i,jk}=1\) if \(j=k\) and \(R_{i,jk}=\rho\) if \(j\ne k\). For \(n_i\ge 2\), it is positive definite exactly when \(-1/(n_i-1)<\rho<1\). If one common \(\rho\) is used across clusters, it must satisfy this condition for every cluster of size at least 2.

When Is the Matrix Positive Definite?

The form involving \(\mathbf{1}_{n_i}\mathbf{1}_{n_i}^{T}\) makes the eigenvalues easy to identify. The vector of ones is an eigenvector: multiplying \(R_i(\rho)\) by it gives \(\{1+(n_i-1)\rho\}\mathbf{1}_{n_i}\). Any vector orthogonal to \(\mathbf{1}_{n_i}\) has entries summing to zero, so multiplication by \(R_i(\rho)\) gives \(1-\rho\) times that vector. This orthogonal subspace has dimension \(n_i-1\).

Result: For \(n_i\ge2\), the eigenvalue of \(R_i(\rho)\) in the direction of \(\mathbf{1}_{n_i}\) is \(1+(n_i-1)\rho\), and each of its \(n_i-1\) eigenvalues in directions orthogonal to \(\mathbf{1}_{n_i}\) is \(1-\rho\). Hence \(R_i(\rho)\) is positive definite exactly when both eigenvalue types are positive.

Proof. The two subspaces just described are orthogonal and together span \(\mathbb{R}^{n_i}\). A real symmetric matrix is positive definite exactly when its eigenvalues are all positive. Therefore we require \(1-\rho>0\) and \(1+(n_i-1)\rho>0\). Rearranging gives \(\rho<1\) and \(\rho>-1/(n_i-1)\), respectively. For clusters with different sizes, the common parameter must lie in the intersection of their allowable intervals. A cluster of size 1 has \(R_i=[1]\), so it places no restriction on \(\rho\). \(\square\)

This condition is about the working matrix being invertible and positive definite, not about whether a negative correlation is plausible in a particular application. For example, with clusters of sizes 3 and 5, both matrices are positive definite only if \(-1/4<\rho<1\): the larger cluster gives the stricter lower bound.

Inverse Matrix and the Cluster-Level GEE

Write \(J_i=\mathbf{1}_{n_i}\mathbf{1}_{n_i}^{T}\). When \(R_i(\rho)\) is positive definite, its inverse is

$$ R_i(\rho)^{-1} = \frac{1}{1-\rho} \left( I_{n_i} - \frac{\rho}{1+(n_i-1)\rho}J_i \right). $$

To verify the expression, set \(a=1-\rho\) and \(b=\rho\), so \(R_i=aI_{n_i}+bJ_i\). Since \(J_i^2=n_iJ_i\), multiply \(aI_{n_i}+bJ_i\) by \(a^{-1}(I_{n_i}-cJ_i)\), where \(c=b/(a+bn_i)\). The product is

$$ I_{n_i} + \left( \frac{b}{a}-c-\frac{bn_i c}{a} \right)J_i =I_{n_i}, $$

because \(c=b/(a+bn_i)\). Substituting \(a=1-\rho\) and \(a+bn_i=1+(n_i-1)\rho\) gives the stated inverse. The positivity conditions ensure its denominators are nonzero.

Let \(\beta\) denote the mean-model parameter, and let \(D_i=\partial\mu_i/\partial\beta^T\) be the \(n_i\)-by-\(p\) derivative matrix. The cluster contribution to the GEE is

$$ U_i(\beta)=D_i^T V_i^{-1}(Y_i-\mu_i), \qquad U(\beta)=\sum_i U_i(\beta). $$

This is the usual multivariate quasi-score form, with the working covariance used to weight the residual vector. Define the standardized residual vector \(e_i=A_i^{-1/2}(Y_i-\mu_i)\), whose \(j\)th entry is \(e_{ij}=(Y_{ij}-\mu_{ij})/\sqrt{v(\mu_{ij})}\). Substituting the covariance and inverse above yields

$$ \begin{aligned} U_i(\beta) &=\phi^{-1}D_i^T A_i^{-1/2}R_i(\rho)^{-1}e_i\\ &=\frac{\phi^{-1}}{1-\rho} D_i^T A_i^{-1/2} \left( e_i-\frac{\rho}{1+(n_i-1)\rho}\mathbf{1}_{n_i}\sum_{k=1}^{n_i}e_{ik} \right). \end{aligned} $$
Result: For each response \(j\) in cluster \(i\), the exchangeable inverse-correlation-weighted standardized residual is \(e_{ij}-\dfrac{\rho}{1+(n_i-1)\rho}\sum_{k=1}^{n_i}e_{ik}\), with an overall factor \(1/(1-\rho)\). The cluster contribution then multiplies these adjusted residuals by the corresponding derivative vectors, scales them by their marginal standard deviations, and includes the factor \(\phi^{-1}\).

Derivation. Since \(V_i^{-1}=\phi^{-1}A_i^{-1/2}R_i(\rho)^{-1}A_i^{-1/2}\), the definition of \(e_i\) gives the first equality. The inverse formula gives \(R_i^{-1}e_i=(1-\rho)^{-1}\{e_i-\rho\mathbf{1}_{n_i}(\mathbf{1}_{n_i}^Te_i)/[1+(n_i-1)\rho]\}\). Finally, \(\mathbf{1}_{n_i}^Te_i=\sum_k e_{ik}\), which proves the displayed expression. \(\square\)

The shared residual sum is the source of the coupling: every standardized residual enters the adjustment for every response in that cluster. The adjustment is then combined with the response-specific derivatives and variance functions. Thus, it is not generally correct to replace a whole cluster by one unweighted residual sum.

Worked Calculations

Worked Example: Inverting a Three-Response Working Correlation

Suppose a cluster has \(n_i=3\) and working correlation \(\rho=0.4\). The admissible interval is \(-1/2<\rho<1\), so this choice gives a positive definite matrix. Its correlation matrix and inverse are

$$ R_i= \begin{pmatrix} 1&0.4&0.4\\ 0.4&1&0.4\\ 0.4&0.4&1 \end{pmatrix}, \qquad R_i^{-1} = \frac{5}{3} \left[ I_3-\frac{2}{9} \begin{pmatrix} 1&1&1\\ 1&1&1\\ 1&1&1 \end{pmatrix} \right] = \begin{pmatrix} 35/27&-10/27&-10/27\\ -10/27&35/27&-10/27\\ -10/27&-10/27&35/27 \end{pmatrix}. $$

For standardized residuals \(e_i=(1,-1,2)^T\), their sum is 2 and \(\rho/\{1+(n_i-1)\rho\}=0.4/1.8=2/9\). The adjusted vector before the overall factor is therefore

$$ e_i-\frac{2}{9}\mathbf{1}_3(2) = \begin{pmatrix}5/9\\-13/9\\14/9\end{pmatrix}, \qquad R_i^{-1}e_i = \frac{5}{3} \begin{pmatrix}5/9\\-13/9\\14/9\end{pmatrix} = \begin{pmatrix}25/27\\-65/27\\70/27\end{pmatrix}. $$

The inverse has changed each component using the cluster-wide residual sum. If the derivative and variance scaling are the same for all three responses, the scalar residual weight in the cluster contribution is the sum of these components, \(30/27=10/9\).

Worked Example: A Binary Logistic GEE Contribution

Consider two binary responses with logistic marginal means \(\mu_{i1}=0.2\) and \(\mu_{i2}=0.6\), corresponding to covariate rows \((1,0)\) and \((1,1)\). For \(\beta=(\beta_0,\beta_1)^T\), the derivative row for a logistic mean is \(\mu_{ij}(1-\mu_{ij})(1,x_{ij})\). Thus

$$ D_i= \begin{pmatrix} 0.16&0\\ 0.24&0.24 \end{pmatrix}, \qquad A_i= \begin{pmatrix} 0.16&0\\ 0&0.24 \end{pmatrix}. $$

Suppose the observed outcomes are \(Y_i=(1,0)^T\), \(\phi=1\), and \(\rho=0.5\). The residual vector is \((0.8,-0.6)^T\), so the standardized residuals are \(e_i=(2,-3/\sqrt{6})^T\). For \(n_i=2\), the inverse correlation matrix is

$$ R_i^{-1} =2\left(I_2-\frac{1}{3}J_i\right) = \begin{pmatrix} 4/3&-2/3\\ -2/3&4/3 \end{pmatrix}. $$

Multiplying gives \(R_i^{-1}e_i=((8+\sqrt{6})/3,-(4+2\sqrt{6})/3)^T\). The columns of \(D_i^TA_i^{-1/2}\) are \((0.4,0)^T\) and \((\sqrt{6}/5,\sqrt{6}/5)^T\). Hence

$$ \begin{aligned} U_i(\beta) &= \begin{pmatrix}0.4\\0\end{pmatrix}\frac{8+\sqrt{6}}{3} + \begin{pmatrix}\sqrt{6}/5\\\sqrt{6}/5\end{pmatrix} \left(-\frac{4+2\sqrt{6}}{3}\right)\\ &= \begin{pmatrix} (4-2\sqrt{6})/15\\ -(12+4\sqrt{6})/15 \end{pmatrix} \approx \begin{pmatrix}-0.060\\-1.453\end{pmatrix}. \end{aligned} $$

Both components use the adjusted residuals from the same cluster. The slope component receives no direct contribution from the first response because its covariate value is zero, but the first response still affects the second response’s inverse-correlation weight.

Worked Example: Equal Residuals in an Intercept-Only Model

Suppose three Gaussian responses share an intercept-only mean of 0, have variance 1, and have observed values \(Y_i=(1,1,1)^T\). Then \(D_i=\mathbf{1}_3\), \(A_i=I_3\), and the standardized residuals are all 1. Take \(\rho=0.25\), which lies in the admissible interval \((-1/2,1)\).

Because the residual vector is in the direction of \(\mathbf{1}_3\), its inverse-correlation weight is divided by the eigenvalue in that direction:

$$ R_i^{-1}e_i=\frac{1}{1+2(0.25)}\mathbf{1}_3 =\frac{2}{3}\mathbf{1}_3. $$

The scalar cluster contribution is therefore \(U_i(\beta)=\mathbf{1}_3^TR_i^{-1}e_i=3(2/3)=2\), whereas under independence it would be \(\mathbf{1}_3^Te_i=3\). Positive exchangeable correlation downweights this common, cluster-level residual direction in this intercept-only example.

Interpretation and a Common Pitfall

The exchangeable assumption is a parsimonious way to represent a common within-cluster association in the working covariance. It can be useful when repeated measurements are similarly related across their occasions, while the marginal mean model still describes the expected response at each occasion or covariate pattern. Its effect on the GEE is algebraic: the inverse working correlation alters how residual patterns contribute to the parameter estimate.

Common mistake: treating correlation as a common multiplier. It is tempting to say that positive correlation simply multiplies every independent-working contribution by the same factor. The inverse formula shows why this is wrong: the adjustment subtracts a multiple of the entire cluster’s standardized residual sum from each component, and the result is then combined with response-specific derivative and variance terms. A common multiplier is obtained only in special directions or models, not for an arbitrary cluster contribution.

Also note the limiting case \(\rho=0\). The inverse becomes \(I_{n_i}\), and the contribution reduces to the independence-working form \(\phi^{-1}D_i^TA_i^{-1}(Y_i-\mu_i)\). This check is useful when deriving or computing an exchangeable contribution.

Check Your Understanding

Use the definitions and derivations above to answer these questions.

  1. For a cluster of size 4, what interval of \(\rho\) makes its exchangeable working correlation matrix positive definite?
  2. In the inverse formula, which part of the residual vector is shared across all adjusted components?
  3. For what value of \(\rho\) does the exchangeable GEE contribution reduce to the independence-working contribution?
  4. Why can a residual from one measurement occasion affect the contribution associated with a different occasion?
  5. If cluster sizes vary, why must the allowable lower bound on a common \(\rho\) be checked against the largest cluster?
Clinical Biostats