Tutorials › Generalized Linear Models › Unstructured Correlation for Fixed Visit Schedules

Working Correlation Choices · Tutorial 862 of 981

Unstructured Correlation for Fixed Visit Schedules

Learn to parameterize an unstructured correlation matrix, count its parameters, and check whether it is suitable for the observed visit pattern and GEE calculations.

Advanced 11 min read

What You'll Learn

  • Write the unstructured correlation matrix for a fixed set of visits
  • Count its distinct pairwise correlation parameters
  • Distinguish pairwise bounds from positive definiteness of the whole matrix
  • Check a three-visit matrix using its determinant
  • Relate cluster sizes and observed visits to the matrix used in GEE
  • Recognize when an unstructured matrix cannot be inverted for standard GEE calculations

What “Unstructured” Means

For repeated measurements, the working correlation describes how responses from the same cluster are related after accounting for their means and marginal variances. With a fixed schedule of \(m\) visits, an unstructured working correlation assigns a separate correlation parameter to every distinct pair of visits. It imposes no requirement that correlations be equal at different lags or follow a particular time-decay rule.

Let the scheduled visits be indexed \(1,\ldots,m\). Write \(\rho_{jk}\) for the working correlation between visits \(j\) and \(k\), where \(j<k\). The working correlation matrix \(R\) is symmetric, has ones on its diagonal, and has \(\rho_{jk}\) in the two positions corresponding to visits \(j\) and \(k\). In a standard GEE, this matrix contributes to the working covariance; the marginal variances are represented separately.

Definition: For a fixed set of \(m\) scheduled visits, an unstructured correlation matrix is a symmetric \(m \times m\) matrix \(R\) with \(R_{jj}=1\) for every \(j\), and an unrestricted separate entry \(R_{jk}=R_{kj}=\rho_{jk}\) for each distinct pair \(j<k\), subject to the requirement that \(R\) be a valid correlation matrix. For standard GEE calculations that use \(R^{-1}\), it must be positive definite.

“Unstructured” does not mean that entries can be chosen without constraints. The symmetry and unit diagonal are part of the specification, and the entire matrix must satisfy a joint positive-definiteness condition. The entries are also not separate variance parameters: they describe correlations, while the marginal variances are handled elsewhere in the working covariance.

Counting the Correlation Parameters

There is one free parameter for each unordered pair of distinct visits. The pair \((j,k)\) is the same correlation as \((k,j)\), so symmetry prevents counting it twice. There are \(m\) choices for the first visit and \(m-1\) remaining choices for the second; dividing by two removes the duplicate orderings.

Result: A fixed schedule of \(m\) visits has \(m(m-1)/2=\binom{m}{2}\) distinct unstructured pairwise correlation parameters. The diagonal contributes no free parameters because every diagonal entry equals one.

For example, two visits require one correlation parameter, three visits require three, and four visits require six. The number grows quadratically with the number of visits. This count describes the entries in the model’s common correlation matrix; it does not guarantee that the available data contain enough information to estimate every entry.

Worked Example: Writing and Counting a Four-Visit Matrix

Suppose every cluster is scheduled for four visits. List the distinct correlations and write the unstructured matrix.

The unordered pairs are \((1,2),(1,3),(1,4),(2,3),(2,4),(3,4)\). Thus there are \(\binom{4}{2}=4(3)/2=6\) distinct parameters, which we denote by \(\rho_{12},\rho_{13},\rho_{14},\rho_{23},\rho_{24},\rho_{34}\).

$$ R= \begin{pmatrix} 1 & \rho_{12} & \rho_{13} & \rho_{14}\\ \rho_{12} & 1 & \rho_{23} & \rho_{24}\\ \rho_{13} & \rho_{23} & 1 & \rho_{34}\\ \rho_{14} & \rho_{24} & \rho_{34} & 1 \end{pmatrix}. $$

The diagonal contains four fixed ones, not four additional parameters. For instance, \(\rho_{13}\) and \(\rho_{31}\) are the same parameter because correlations are symmetric. The six parameters do not encode a lag pattern: \(\rho_{12}\) need not equal \(\rho_{23}\) or \(\rho_{34}\).

Positive Definiteness Is a Joint Requirement

A correlation matrix is positive definite if \(x^\mathsf{T}Rx>0\) for every nonzero vector \(x\). This condition ensures that the matrix is invertible and is the relevant requirement when standard GEE calculations use its inverse. Each pairwise correlation must lie strictly between \(-1\) and \(1\) when the matrix is positive definite, but those separate bounds do not ensure that a larger matrix is positive definite.

For three visits, write \(a=\rho_{12}\), \(b=\rho_{13}\), and \(c=\rho_{23}\). The matrix and its determinant are

$$ R= \begin{pmatrix} 1&a&b\\ a&1&c\\ b&c&1 \end{pmatrix}, \qquad \det(R)=1+2abc-a^2-b^2-c^2. $$

For this three-visit matrix, positive definiteness holds exactly when \(|a|<1\) and \(\det(R)>0\). In particular, the determinant condition adds a joint restriction beyond the individual pairwise bounds.

Result (three-visit positive-definiteness check): The matrix above is positive definite if and only if \(|a|<1\) and \(1+2abc-a^2-b^2-c^2>0\).

To verify the criterion, partition the matrix into its first two rows and columns and its final row and column. The leading \(2\times2\) block \(B=\begin{pmatrix}1&a\\a&1\end{pmatrix}\) is positive definite exactly when \(|a|<1\). For this condition, completing the square in the quadratic form for \(R\) shows that its remaining one-dimensional part has coefficient \(1-(b^2-2abc+c^2)/(1-a^2)\). The full quadratic form is positive for every nonzero vector exactly when that coefficient is positive. Multiplying it by \(1-a^2>0\) gives \(1-a^2-b^2-c^2+2abc>0\), which is \(\det(R)>0\). This proves the stated condition. \(\square\)

Worked Example: Pairwise Bounds Are Not Enough

Consider three proposed correlations \(a=0.8\), \(b=0.8\), and \(c=-0.8\). Each lies between \(-1\) and \(1\), so each pair considered alone looks allowable. Check whether they form a valid positive-definite matrix.

Substitute the values into the determinant:

$$ \det(R)=1+2(0.8)(0.8)(-0.8)-(0.8)^2-(0.8)^2-(-0.8)^2 =1-1.024-0.64-0.64-0.64=-1.944. $$

The determinant is negative, so the matrix is not positive definite. The three pairwise choices cannot jointly describe a valid positive-definite correlation matrix, despite each individual value satisfying the pairwise bound. It therefore cannot be used as an invertible working correlation matrix in standard GEE calculations.

For matrices with more than three visits, checking each pair separately is still insufficient. The full matrix must be positive definite. In practice, a matrix factorization or an eigenvalue check can assess this condition; for a symmetric matrix, positive definiteness is equivalent to all eigenvalues being positive. A matrix that is merely positive semidefinite may represent a degenerate correlation structure, but it is singular and does not have the inverse required by standard GEE calculations.

Cluster Sizes and the Visit Schedule

A common unstructured matrix is most straightforward when every cluster has a complete set of the same \(m\) scheduled visits. Then each cluster’s working correlation has the same dimension and the same visit labels, and the full \(m\times m\) matrix applies. There must be at least two scheduled visits for the matrix to contain any pairwise correlation parameters; for one visit, the matrix is simply \((1)\).

Clusters with different numbers of observed visits can still be associated with a common full-schedule matrix when each observed response can be matched to its correct scheduled visit. If cluster \(i\) is observed at the subset \(S_i\) of scheduled visits, its working correlation is the submatrix formed by retaining the rows and columns indexed by \(S_i\). This uses the same underlying schedule-specific parameters, rather than treating a cluster’s first observed measurement as the same visit regardless of its actual scheduled position.

Result: Every principal submatrix of a positive-definite matrix is positive definite. Therefore, if a common full-schedule \(R\) is positive definite, the submatrix for any subset of its scheduled visits is also positive definite.

To prove this result, take a nonempty subset \(S\) of the visit indices and a nonzero vector \(y\) with one component for each index in \(S\). Form a vector \(x\) of length \(m\) by placing the components of \(y\) at the indices in \(S\) and zeros elsewhere. Then \(x\) is nonzero and \(y^\mathsf{T}R_{S,S}y=x^\mathsf{T}Rx>0\), because \(R\) is positive definite. This is precisely the definition of positive definiteness for the principal submatrix \(R_{S,S}\). \(\square\)

This matrix fact concerns validity, not whether every parameter can be estimated from the observed data. If a pair of scheduled visits is never jointly observed, the corresponding pairwise relationship is not directly represented by an observed pair in that sample. The parameter count for a full unstructured matrix remains \(\binom{m}{2}\), but the count alone does not establish that all those parameters are estimable.

Worked Example: A Cluster Observed at a Subset of Visits

Suppose the scheduled visits are \(1,2,3\), with a common working correlation

$$ R= \begin{pmatrix} 1&0.2&0.4\\ 0.2&1&0.5\\ 0.4&0.5&1 \end{pmatrix}. $$

First check the full matrix. Its determinant is

$$ 1+2(0.2)(0.4)(0.5)-(0.2)^2-(0.4)^2-(0.5)^2 =1+0.08-0.04-0.16-0.25=0.63. $$

The first leading \(2\times2\) block has determinant \(1-(0.2)^2=0.96>0\), and the first diagonal entry is \(1>0\). Together with the positive full determinant, these leading principal minors show that \(R\) is positive definite.

Now suppose a particular cluster has observed visits \(1\) and \(3\), but not visit \(2\). Its working correlation is the submatrix at rows and columns \(1\) and \(3\):

$$ R_{\{1,3\},\{1,3\}}= \begin{pmatrix} 1&0.4\\ 0.4&1 \end{pmatrix}. $$

Its determinant is \(1-(0.4)^2=0.84>0\), so it is positive definite. The correlation is \(\rho_{13}=0.4\), not \(\rho_{12}=0.2\): the observed pair is visits \(1\) and \(3\), even though they are adjacent in this cluster’s list of observed measurements.

When the Unstructured Choice Is Useful—and Its Limits

An unstructured matrix is flexible when the study has a modest, fixed set of visits and there is no reason to impose a common-correlation or time-decay pattern. It lets each visit pair have its own working correlation. That flexibility comes with a rapidly increasing number of parameters: moving from four to eight visits increases the count from \(6\) to \(28\). This makes the choice increasingly demanding as the schedule grows.

The fixed-schedule qualification matters. The entries \(\rho_{jk}\) refer to correlations for particular scheduled visits. If measurement times vary across clusters, the same visit indices must still identify comparable occasions for a common matrix to have that interpretation. A visit-indexed unstructured matrix does not automatically encode how correlation changes with elapsed time.

Common mistake: “Every proposed pairwise correlation is between \(-1\) and \(1\), so the full unstructured matrix is valid.” The correction is that these are necessary pairwise bounds, not a sufficient joint condition. The whole matrix must be positive definite for standard inverse-based GEE calculations. For three visits, the determinant check makes the additional restriction explicit; for larger matrices, check positive definiteness of the full matrix.

A second practical distinction is between the number of entries and the amount of information in the data. A schedule with \(m\) visits defines \(m(m-1)/2\) parameters, but unequal cluster sizes or unobserved visit pairs can leave some relationships weakly represented or unavailable in the observed sample. Positive definiteness guarantees a usable inverse for the specified matrix; it does not, by itself, guarantee reliable estimation of every correlation.

Key takeaway: For \(m\) fixed visits, an unstructured working correlation has one parameter for each distinct visit pair, or \(m(m-1)/2\) parameters. The visit labels must be aligned across clusters, and the full matrix must be positive definite when its inverse is required. Pairwise bounds alone do not establish this.

Check Your Understanding

Use the definitions and checks in this tutorial to answer the following.

  1. How many distinct correlation parameters are in an unstructured matrix for five fixed visits? Explain why symmetry does not double the count.
  2. For a three-visit matrix, explain why three correlations that each lie between \(-1\) and \(1\) may still fail to define a positive-definite matrix.
  3. A cluster is observed at scheduled visits \(2\) and \(4\) from a four-visit schedule. Which entry of the common matrix describes its observed pair?
  4. Why does positive definiteness of a full-schedule matrix guarantee positive definiteness for the matrix corresponding to a subset of visits?
  5. What is the distinction between having the correct number of unstructured parameters and having enough observed data to estimate all of them?
Clinical Biostats