Tutorials › Generalized Linear Models › Common Mistakes in Working-Correlation Specification

Working Correlation Choices · Tutorial 877 of 981

Common Mistakes in Working-Correlation Specification

Learn how to specify and interpret a GEE working correlation without confusing it with covariance or a scientific model for the responses.

Advanced 11 min read

What You'll Learn

  • Distinguish a working correlation matrix from the working covariance matrix used in GEE.
  • Check the admissible parameter range for an exchangeable correlation matrix.
  • Decide when discrete-time AR(1) does and does not reflect visit spacing.
  • Use a continuous-time correlation form with valid parameters and distinct times.
  • Interpret an estimated working correlation as a nuisance quantity, not an outcome-model conclusion.

Why Working-Correlation Errors Matter

In generalized estimating equations (GEE), a working correlation describes how responses within a cluster are treated as associated when the estimating equation is constructed. It is called “working” because it supplies a useful weighting structure; it need not be a complete probability model for the responses. Small specification errors can nevertheless matter: the calculation may use the wrong units, represent the visit schedule incorrectly, or require an inverse that does not exist.

The central distinction is between a correlation matrix, whose diagonal entries are one, and a covariance matrix, whose diagonal entries are variances. A correlation choice also needs to respect the design: an AR(1) form refers to lags in an ordered sequence unless a time-spacing form is specified. Finally, a fitted working-correlation parameter is not automatically a scientifically meaningful outcome parameter.

Correlation Is Not Covariance

Definition: For cluster \(i\), let \(Y_i\) be its response vector, \(\mu_i=E[Y_i]\), and \(A_i\) the diagonal matrix of marginal response variances under the specified mean and variance model. A working correlation matrix \(R_i(\alpha)\) has ones on its diagonal and working within-cluster correlations off the diagonal. The corresponding working covariance matrix is $$ V_i=A_i^{1/2}R_i(\alpha)A_i^{1/2}. $$ Here \(\alpha\) denotes one or more working-correlation parameters.

Thus, \(R_i\) is dimensionless, while the entries of \(V_i\) have the units of products of response measurements. For responses with standard deviations \(s_{ij}\) and \(s_{ik}\), the working covariance between components \(j\) and \(k\) is \(R_{i,jk}s_{ij}s_{ik}\), not \(R_{i,jk}\) itself. A valid correlation matrix alone does not determine the working covariance until the marginal variances are supplied.

The working covariance enters the GEE through its inverse. In a standard notation, the cluster contribution to the estimating equation is \(D_i^\mathsf{T}V_i^{-1}(Y_i-\mu_i)\), where \(D_i\) is the derivative of \(\mu_i\) with respect to the mean-model coefficients. Confusing \(R_i\) with \(V_i\) therefore changes the weights and may also produce a matrix with the wrong units.

Worked Example: Convert a Working Correlation to Covariance

Suppose a two-response cluster has marginal standard deviations 2 and 3, and its working correlation is 0.4. Calculate the working covariance matrix and distinguish its off-diagonal entry from the correlation.

The marginal variances are \(2^2=4\) and \(3^2=9\), so \(A=\operatorname{diag}(4,9)\). The working correlation matrix and its corresponding covariance matrix are $$ R=\begin{pmatrix}1&0.4\\0.4&1\end{pmatrix}, \qquad V= \begin{pmatrix}2&0\\0&3\end{pmatrix} R \begin{pmatrix}2&0\\0&3\end{pmatrix} = \begin{pmatrix}4&2.4\\2.4&9\end{pmatrix}. $$

The working correlation is 0.4. The working covariance is \(0.4(2)(3)=2.4\), in the product of the two response units. Calling 2.4 a correlation is incorrect; calling 0.4 the covariance is also incorrect.

Check Admissibility Before Using Exchangeable Correlation

An exchangeable structure assigns the same correlation \(\rho\) to every distinct pair of responses in a cluster. Its simplicity does not make every value of \(\rho\) permissible. For a cluster of size \(m\), the matrix must be positive definite if the GEE calculation is to invert it.

Theorem: For \(m\geq2\), the \(m\times m\) exchangeable correlation matrix, with diagonal entries 1 and all off-diagonal entries \(\rho\), is positive definite exactly when $$ -\frac{1}{m-1}<\rho<1. $$ If cluster sizes vary and a single exchangeable parameter is used for clusters up to size \(M\), positive definiteness for all those clusters requires \(-1/(M-1)<\rho<1\), provided \(M\geq2\).

Proof. Write the exchangeable matrix as \(R=(1-\rho)I_m+\rho\mathbf{1}\mathbf{1}^\mathsf{T}\), where \(\mathbf{1}\) is the vector of \(m\) ones. Any vector orthogonal to \(\mathbf{1}\) is multiplied by \(1-\rho\), so this is an eigenvalue with multiplicity \(m-1\). The vector \(\mathbf{1}\) is multiplied by \(1+(m-1)\rho\), giving the remaining eigenvalue. A real symmetric matrix is positive definite exactly when all its eigenvalues are positive. The two required inequalities are \(1-\rho>0\) and \(1+(m-1)\rho>0\), which are equivalent to the stated bounds. For varying cluster sizes, the lower bound is most restrictive at the largest size \(M\). \(\square\)

At either endpoint, the matrix is singular: an eigenvalue is zero. Such a matrix is positive semidefinite but not positive definite, and it cannot be used where \(V_i^{-1}\) is required. For singleton clusters, there are no off-diagonal correlations to estimate or check.

Worked Example: Reject an Inadmissible Exchangeable Value

Suppose the largest cluster contains four visits and a proposed common exchangeable correlation is \(\rho=-0.4\). Determine whether the working correlation is invertible.

For \(m=4\), the admissible interval is \(-1/3<\rho<1\). Since \(-0.4<-1/3\), the proposed value is outside the interval. The eigenvalues are \(1-\rho=1.4\), with multiplicity three, and \(1+3\rho=1-1.2=-0.2\). The negative eigenvalue confirms that the matrix is not positive definite.

For comparison, if \(\rho=-0.2\), the eigenvalues are \(1.2\) (three times) and \(1+3(-0.2)=0.4\). Both are positive, so this exchangeable matrix is positive definite. With clusters of different sizes, checking only a smaller cluster is not enough: the bound must hold for the largest size used.

Visit Order and Visit Spacing Are Different Choices

A discrete AR(1) working correlation uses the positions of observations in an ordered sequence. For visits indexed \(1,\ldots,m\), its entries are \(R_{jk}=\rho^{|j-k|}\), with \(-1<\rho<1\). The model assigns the same correlation to any two pairs separated by the same number of visit positions. It does not, by itself, measure the elapsed time between visits.

Result: For \(-1<\rho<1\), the discrete AR(1) matrix with entries \(\rho^{|j-k|}\) is positive definite.

Proof. Let \(\varepsilon_1,\ldots,\varepsilon_m\) be independent standard normal random variables. Define \(Z_1=\varepsilon_1\) and, for \(j\geq2\), define \(Z_j=\rho Z_{j-1}+\sqrt{1-\rho^2}\,\varepsilon_j\). By induction, each \(Z_j\) has variance 1. For \(j>k\), repeated substitution gives \(Z_j=\rho^{j-k}Z_k\) plus a sum of terms involving only \(\varepsilon_{k+1},\ldots,\varepsilon_j\), which are independent of \(Z_k\). Therefore \(\operatorname{Cov}(Z_j,Z_k)=\rho^{j-k}\). The covariance matrix of \((Z_1,\ldots,Z_m)\) is the stated AR(1) matrix. This vector is an invertible lower-triangular transformation of the independent innovations: the diagonal entries of that transformation are 1 for the first component and \(\sqrt{1-\rho^2}>0\) thereafter. An invertible transformation of a vector with identity covariance has positive-definite covariance. Hence the AR(1) matrix is positive definite. \(\square\)

When visits are irregularly spaced, a continuous-time form may be more appropriate. For distinct times \(t_1,\ldots,t_m\), a common choice is \(R_{jk}=\exp(-\lambda|t_j-t_k|)\), with \(\lambda>0\) when an inverse is required. The time unit must be stated: \(\lambda\) is measured per unit of time. If \(\lambda=0\), every entry is 1; for \(m\geq2\), the resulting matrix is singular and cannot be inverted. Although it is positive semidefinite, it is not suitable for a GEE calculation that requires an inverse.

Worked Example: Respect Unequal Visit Spacing

A participant is measured on days 0, 1, and 4. Compare the correlation assigned to the first and third visits by a discrete AR(1) structure with \(\rho=0.5\) and by the continuous-time form with \(\lambda=0.2\) per day.

In discrete AR(1), visits 1 and 3 are two positions apart, so their working correlation is \(0.5^2=0.25\). The unequal elapsed time does not change that calculation. Under the continuous-time form, the elapsed time is four days, giving \(\exp(-0.2|4-0|)=\exp(-0.8)\approx0.4493\). For the first and second visits, the continuous-time value is \(\exp(-0.2)\approx0.8187\).

These are different specifications, not conflicting calculations. Discrete AR(1) treats visit positions as the relevant lags; the exponential form uses the actual time differences in the stated unit. Choosing between them requires attention to how the study scheduled and recorded visits.

An Estimated Working Correlation Is Not an Outcome Model

A working-correlation parameter is generally estimated from the observed clusters, often using residual-based moments within an iterative GEE procedure. That makes it an estimated quantity in the computation, but not automatically a scientific parameter of primary interest. In particular, a fitted association value does not establish a biological mechanism, a causal effect, or a complete joint distribution for the responses.

GEE specifies a marginal mean model and uses a working covariance to weight its estimating equations. A convenient working association can be useful even when it is only an approximation. Under the usual conditions for GEE, a correctly specified mean model can still target the same marginal mean coefficients when the working correlation is not exactly the true association structure; the working choice affects the weighting and efficiency. This does not make every choice harmless: invalid matrices, incorrect visit indexing, and failed numerical calculations remain real errors.

Worked Example: Interpret a Fitted Working Parameter

Suppose a GEE analysis of repeated binary responses reports a fitted exchangeable working correlation of \(\hat{\rho}=0.32\). What does this number say, and what does it not say?

It says that, within the chosen working structure, the fitted off-diagonal correlation used to construct the working covariance is 0.32. For a cluster of size three, the resulting working correlation matrix is $$ \begin{pmatrix} 1&0.32&0.32\\ 0.32&1&0.32\\ 0.32&0.32&1 \end{pmatrix}. $$ Its eigenvalues are \(1-0.32=0.68\) (twice) and \(1+2(0.32)=1.64\), so it is positive definite.

The estimate does not, on its own, show that one response causes another, explain why responses are associated, or specify their full joint distribution. It is a fitted working quantity conditional on the chosen mean model, residual calculation, and correlation structure. Treating 0.32 as a scientific outcome conclusion goes beyond what the working-correlation estimate establishes.

Common Mistakes and a Practical Check

  • Using “correlation” and “covariance” interchangeably. The working correlation is dimensionless; multiply by the marginal standard deviations to obtain the corresponding covariance.
  • Assuming every exchangeable value is valid. Check the strict positive-definiteness bounds for the largest cluster size, not just whether \(\rho\) lies between \(-1\) and 1.
  • Applying discrete AR(1) to irregular time as if it used elapsed time. Its exponent is the difference in visit positions. Use a time-spacing form if elapsed time is the intended lag measure.
  • Keeping records in an accidental order. Specify the visit ordering used by the structure; the index must represent the intended sequence.
  • Interpreting a fitted working parameter as a scientific finding. It describes the chosen working covariance, not necessarily a mechanism or a full joint response model.

Before fitting, verify that the correlation structure matches the ordering and spacing of the design, that its parameter values yield an invertible matrix for every cluster size, and that marginal variances are incorporated when constructing \(V_i\). These checks prevent conceptual errors as well as matrix-inversion failures.

Check Your Understanding

Answer each question by identifying the structure and the relevant mathematical check.

  1. A cluster has five responses and an exchangeable working correlation of \(-0.24\). Is the correlation matrix positive definite? Show the admissible lower bound.
  2. If two responses have standard deviations 2 and 5 and working correlation 0.3, what is their working covariance?
  3. For visits at weeks 0, 2, and 6, what does a discrete AR(1) structure use to determine the correlation between the first and third visits? How does that differ from a continuous-time form?
  4. Why is an exchangeable matrix with \(\rho=1\) unsuitable when a cluster has more than one response and the GEE requires an inverse?
  5. A fitted working correlation is positive and statistically estimated. Name one valid interpretation and one scientific conclusion that does not follow from that fact alone.
Clinical Biostats