Tutorials › Generalized Linear Models › Method-of-Moments Estimation for Exchangeable Correlation

Working Correlation Choices · Tutorial 865 of 981

Method-of-Moments Estimation for Exchangeable Correlation

Learn how to pool within-cluster residual cross-products for exchangeable correlation and enforce the correlation matrix’s validity bounds.

Advanced 10 min read

What You'll Learn

  • Define standardized residual cross-products as moments for exchangeable correlation
  • Derive pair-weighted and cluster-weighted pooled estimators
  • Explain how unequal cluster sizes affect the two pooled estimates
  • Derive admissible exchangeable-correlation bounds from matrix eigenvalues
  • Apply a strict positive-definiteness constraint to an out-of-range estimate
  • Recognize when the residual-moment estimator is only a plug-in approximation

From Residual Pairs to a Pooled Moment

An exchangeable working correlation uses one parameter, \(\rho\), for every distinct pair of responses in the same cluster. Estimating that parameter from observed data therefore amounts to pooling information across within-cluster pairs. The key choice is how to pool: give every pair equal weight, or first summarize each cluster and then give every cluster equal weight. These approaches agree when cluster sizes are equal, but need not agree otherwise.

Let cluster \(i\) contain \(m_i\) responses, with marginal mean \(\mu_{ij}\) and variance \(s_{ij}^2\), for \(i=1,\ldots,K\) and \(j=1,\ldots,m_i\). Define the true standardized residual \(U_{ij}=(Y_{ij}-\mu_{ij})/s_{ij}\). In practice, the means and variances are estimated, giving the standardized residual \(\hat r_{ij}=(Y_{ij}-\hat\mu_{ij})/\hat s_{ij}\). For a GLM, the estimated marginal variance may, for example, be written \(\hat s_{ij}^2=\hat\phi V(\hat\mu_{ij})\), where \(\hat\phi\) is a scale estimate and \(V\) is the variance function.

Definition: Under an exchangeable correlation model, standardized residuals have mean zero, variance one, and common within-cluster correlation \(\rho\): for \(j\ne k\), \(E[U_{ij}]=0\), \(\operatorname{Var}(U_{ij})=1\), and \(E[U_{ij}U_{ik}]=\rho\). The pairwise residual moment for cluster \(i\) is \(S_i=\sum_{j<k}U_{ij}U_{ik}\). Its estimated version replaces \(U_{ij}\) by \(\hat r_{ij}\).

There are \(q_i=\binom{m_i}{2}=m_i(m_i-1)/2\) distinct pairs in cluster \(i\). Clusters of size one have \(q_i=0\), so they provide no within-cluster pair for estimating \(\rho\). Write \(\hat S_i=\sum_{j<k}\hat r_{ij}\hat r_{ik}\). The pooled estimators below use these cross-products; they are moment estimators based on fitted residuals, not exact finite-sample unbiased estimators in general.

Two Ways to Pool the Cross-Products

The pair-weighted estimator combines all observed pair products before dividing by the total number of pairs. Thus a cluster with many pairs contributes more than a cluster with few pairs. The cluster-weighted estimator first divides each cluster’s cross-product sum by its own pair count, then averages those cluster averages equally. Let \(\mathcal I=\{i:m_i\ge2\}\) and \(C=|\mathcal I|\).

$$ \hat\rho_{\mathrm{pair}} = \frac{\sum_{i\in\mathcal I}\hat S_i} {\sum_{i\in\mathcal I}q_i}, \qquad \hat\rho_{\mathrm{cluster}} = \frac{1}{C}\sum_{i\in\mathcal I}\frac{\hat S_i}{q_i}. $$

The first formula is undefined if there are no pairs in the data; so is the second if \(C=0\). This happens, for example, if every cluster has size one. The pair-weighted formula is equivalently a weighted average of the cluster-specific averages \(\hat S_i/q_i\), with weights \(q_i\). This identity makes the weighting difference explicit.

$$ \hat\rho_{\mathrm{pair}} = \sum_{i\in\mathcal I} \left(\frac{q_i}{\sum_{\ell\in\mathcal I}q_\ell}\right) \frac{\hat S_i}{q_i}. $$

Worked Example: Unequal Cluster Sizes Give Different Estimates

Suppose two clusters have standardized residuals \((1,-1,0.5)\) and \((0.5,1)\). For the first cluster, the three pair products are \(1(-1)=-1\), \(1(0.5)=0.5\), and \((-1)(0.5)=-0.5\). Thus \(\hat S_1=-1\), \(q_1=3\), and its cluster average is \(-1/3\). For the second cluster, the single product is \(0.5(1)=0.5\), so \(\hat S_2=0.5\), \(q_2=1\), and its cluster average is \(0.5\).

The pair-weighted estimate uses all four pairs: \[ \hat\rho_{\mathrm{pair}}=\frac{-1+0.5}{3+1}=-\frac{0.5}{4}=-0.125. \] The cluster-weighted estimate gives the two clusters equal weight: \[ \hat\rho_{\mathrm{cluster}}=\frac{1}{2}\left(-\frac{1}{3}+\frac{1}{2}\right)=\frac{1}{12}\approx0.0833. \] The discrepancy is not an arithmetic error: the larger cluster contributes three quarters of the pairs to the first estimate, but only one half of the cluster averages to the second.

Result: If the cluster sizes are fixed, the true standardized residuals satisfy the exchangeable moment conditions, and there is at least one cluster with \(m_i\ge2\), both corresponding population-moment estimators have expectation \(\rho\). This statement concerns true residuals; replacing them with fitted residuals does not in general preserve exact unbiasedness.

To verify the result, let \(Q=\sum_{i\in\mathcal I}q_i>0\). For each within-cluster pair, \(E[U_{ij}U_{ik}]=\rho\). Linearity of expectation therefore gives \(E[S_i]=q_i\rho\), without requiring different pair products to be independent. Hence \[ E\left[\frac{\sum_i S_i}{Q}\right]=\frac{\sum_i q_i\rho}{Q}=\rho. \] For the cluster-weighted version, \(E[S_i/q_i]=\rho\) for every \(i\in\mathcal I\), so \[ E\left[\frac{1}{C}\sum_{i\in\mathcal I}\frac{S_i}{q_i}\right] =\frac{1}{C}\sum_{i\in\mathcal I}\rho=\rho. \] These calculations establish the population-moment claim. They do not establish that either estimator has smaller variance, or that either plug-in estimate is exactly unbiased after fitting the mean model. \(\square\)

Worked Example: Computing Both Estimates From Cluster Summaries

Suppose three clusters have sizes \(2,3,4\), and their observed standardized-residual cross-product sums are \(-0.2\), \(0.9\), and \(1.2\), respectively. The pair counts are \(1\), \(3\), and \(6\). The pair-weighted estimate is \[ \hat\rho_{\mathrm{pair}}=\frac{-0.2+0.9+1.2}{1+3+6}=\frac{1.9}{10}=0.19. \]

The cluster-specific averages are \(-0.2/1=-0.2\), \(0.9/3=0.3\), and \(1.2/6=0.2\). Giving these three clusters equal weight gives \[ \hat\rho_{\mathrm{cluster}}=\frac{-0.2+0.3+0.2}{3}=0.1. \] Both calculations use the same cross-product summaries, but the size-four cluster supplies six of the ten pairs to the pair-weighted estimate. This is why the choice of pooling rule matters when cluster sizes differ.

Admissible Values From the Correlation Matrix

A moment estimate is not automatically a valid exchangeable correlation. For a cluster of size \(m\ge2\), its exchangeable correlation matrix has ones on the diagonal and \(\rho\) off the diagonal. It can be written \(R_m(\rho)=(1-\rho)I_m+\rho J_m\), where \(I_m\) is the identity matrix and \(J_m\) is the matrix of ones.

Result: The matrix \(R_m(\rho)\) is positive definite exactly when \(-1/(m-1)<\rho<1\). It is positive semidefinite exactly when \(-1/(m-1)\le\rho\le1\).

For a proof, the vector of all ones is an eigenvector of \(J_m\) with eigenvalue \(m\). Every vector orthogonal to it is an eigenvector of \(J_m\) with eigenvalue zero. Consequently, \(R_m(\rho)\) has eigenvalue \(1+(m-1)\rho\) in the all-ones direction and eigenvalue \(1-\rho\) in each of the \(m-1\) orthogonal directions. Positive definiteness requires both eigenvalues to be strictly positive: \[ 1+(m-1)\rho>0 \quad\text{and}\quad 1-\rho>0. \] Solving gives \(\rho>-1/(m-1)\) and \(\rho<1\). Replacing strict inequalities by weak ones gives the positive-semidefinite condition. \(\square\)

For several cluster sizes, a common working correlation must satisfy the bound for every cluster. If \(m_{\max}\) is the largest observed cluster size of at least two, the combined positive-definite range is \[ -\frac{1}{m_{\max}-1}<\rho<1. \] Indeed, \(-1/(m-1)\) increases as \(m\) increases, becoming less negative. Therefore the largest cluster size gives the greatest lower bound, which is the strictest one. Singleton clusters impose no correlation-matrix restriction because they contain no off-diagonal entries.

Worked Example: Enforcing the Bound for Unequal Cluster Sizes

Suppose the cluster sizes are \(2,4,3\). Their pair counts are \(1,6,3\), for \(10\) pairs in total. Suppose the observed cross-product sums are \(-0.8,-2.4,-0.9\), respectively. The raw pair-weighted estimate is \[ \hat\rho_{\mathrm{pair}}=\frac{-0.8-2.4-0.9}{10}=\frac{-4.1}{10}=-0.41. \]

For size \(2\), the lower positive-definite bound is \(-1\); for size \(3\), it is \(-1/2\); and for size \(4\), it is \(-1/3\). The common parameter must therefore satisfy \(-1/3<\rho<1\). The raw estimate \(-0.41\) violates that condition, so it cannot define a positive-definite exchangeable working correlation for all three clusters.

One practical correction is to truncate to a chosen interior interval. For example, with margin \(\epsilon=0.01\), use \([-1/3+0.01,\,1-0.01]=[-0.3233\ldots,\,0.99]\). Truncating \(-0.41\) to this interval gives approximately \(-0.3233\), which is strictly above \(-1/3\) and below \(1\). The margin is a numerical safeguard chosen by the analyst; it is not part of the method-of-moments derivation.

Interpretation, Practical Use, and a Common Pitfall

The two pooling rules answer slightly different practical questions. Pair weighting estimates the common moment by treating each within-cluster pair as one contribution. Cluster weighting treats each cluster with at least two observations as one contribution, regardless of how many pairs it contains. Under the common-correlation moment model, both target \(\rho\); with finite data, their observed values can differ, as the examples show. The chosen rule should be reported clearly, especially when cluster sizes vary.

In an actual GEE analysis, the residuals are computed using estimated means and possibly an estimated scale. The resulting cross-products are useful plug-in moments, but fitting can induce dependence among residuals and alter their finite-sample moments. Also, the pair products within a cluster are generally dependent because they share responses. The expectation calculations above rely only on linearity and the stated common pair moment; they do not imply independence of products, nor do they by themselves provide a standard error for \(\hat\rho\).

  • Common mistake: averaging all cluster averages and calling it pair-weighted. That is the cluster-weighted estimator. Pair weighting divides the total cross-product sum by the total pair count.
  • Common mistake: checking only that the estimate lies between \(-1\) and \(1\). That is not enough for an exchangeable matrix when cluster size exceeds two. For size \(m\), the lower bound is \(-1/(m-1)\).
  • Correction: Find the largest cluster size, derive its lower bound, and ensure the working value is strictly inside the common admissible interval when positive definiteness is required.
Key takeaway: Pool standardized within-cluster residual cross-products using either pair weights or equal cluster weights, and state which rule was used. Then check the resulting value against \(-1/(m_{\max}-1)<\rho<1\); a raw moment estimate outside this interval must be adjusted before it can define a positive-definite exchangeable working correlation.

Check Your Understanding

Use the definitions and bounds in this tutorial to answer the following questions.

  1. Why does a cluster of size one contribute no information to either pooled residual-pair estimator?
  2. For cluster sizes \(2,3,5\), what is the strict positive-definiteness range for a common exchangeable correlation? Show which cluster determines the lower bound.
  3. With cluster-specific pair averages \(0.2\) and \(-0.1\), and pair counts \(1\) and \(9\), calculate the pair-weighted and cluster-weighted estimates.
  4. Why does the proof of the population-moment result not require the pair products to be independent?
  5. What qualification is needed when interpreting an estimator formed from fitted rather than true standardized residuals?
Clinical Biostats