Tutorials › Bioavailability and Bioequivalence › Covariance Structures for Crossover Repeated Measures

Log-Scale Analysis and ANOVA · Tutorial 188 of 399

Covariance Structures for Crossover Repeated Measures

Learn how compound-symmetry and unstructured models represent dependence among a subject’s period measurements, and how to compare their assumptions and implications.

Intermediate 12 min read

What You'll Learn

  • Write the covariance matrix implied by compound symmetry for repeated crossover periods.
  • Translate covariance parameters into within-subject variances and correlations.
  • Interpret an unstructured covariance matrix and check whether it is positive definite.
  • Compare the flexibility and parameter cost of compound-symmetry and unstructured models.
  • Recognize signs that a covariance model is implausible or too ambitious for the data.

Why Specify a Covariance Structure?

In a crossover study, the same subject contributes log-scale endpoint measurements in multiple periods. Measurements from one subject may be related: a subject with a relatively high endpoint in one period may also tend to have a high endpoint in another. A mixed model needs a covariance structure to describe this dependence while estimating the mean effects of sequence, period, and treatment. The covariance structure describes variability around those means; it does not replace the mean model.

Let \(Y_{ij}\) denote the log-scale endpoint for subject \(i\) in period \(j\). For a study with \(m\) periods, collect a subject’s measurements into \(\mathbf{Y}_i=(Y_{i1},\ldots,Y_{im})^\mathsf{T}\). The model for the mean specifies \(E(\mathbf{Y}_i)\); the covariance matrix \(\boldsymbol{\Sigma}\) specifies how the measurements vary together around that mean. The structures considered here are compound symmetry and unstructured covariance.

Definition: Compound symmetry (CS) assumes that all periods have the same marginal variance and that every pair of distinct periods has the same covariance. Consequently, every pair of distinct period measurements has the same correlation. Unstructured (UN) covariance estimates a separate variance for each period and a separate covariance for each distinct pair of periods, subject to the requirement that the full covariance matrix is positive definite.

These assumptions concern measurements within a subject. Both models ordinarily also assume that different subjects are independent after accounting for the fixed mean model, and that the covariance structure is common across subjects. Likelihood-based inference commonly adds a multivariate normal model for the subject-level measurement vectors. Correct specification of the mean is also needed: an omitted systematic period or treatment pattern should not be mistaken for random covariance.

Compound Symmetry and Its Implied Correlation

A standard CS model can be written as a random subject intercept plus independent period-specific errors. Let \(b_i\) be a subject effect with variance \(\tau^2\), and let \(e_{ij}\) be a period-specific error with variance \(\sigma^2\):

$$ Y_{ij} = \mu_{ij} + b_i + e_{ij}, \qquad \operatorname{Var}(b_i)=\tau^2,\quad \operatorname{Var}(e_{ij})=\sigma^2. $$

Here \(\mu_{ij}\) is the fixed mean for that subject’s sequence, period, and treatment. The random intercept and errors are assumed mutually independent, and the errors are independent across periods. These assumptions imply equal marginal variances and equal covariances across distinct periods:

$$ \operatorname{Var}(Y_{ij})=\tau^2+\sigma^2, \qquad \operatorname{Cov}(Y_{ij},Y_{ik})=\tau^2\quad (j\ne k), \qquad \rho=\frac{\tau^2}{\tau^2+\sigma^2}. $$

Thus the covariance matrix for \(m\) periods has a common diagonal value and a common off-diagonal value. Equivalently, it is \(\boldsymbol{\Sigma}_{CS}=\tau^2\mathbf{J}+\sigma^2\mathbf{I}\), where \(\mathbf{J}\) is the \(m\)-by-\(m\) matrix of ones and \(\mathbf{I}\) is the identity matrix. In this random-intercept form, \(\tau^2\) and \(\sigma^2\) are nonnegative, so the common correlation is between zero and one. A more general CS covariance matrix can permit negative common correlations, but it must still be positive definite; its common correlation must satisfy \(-1/(m-1)<\rho<1\).

The correlation is a standardized measure of within-subject linear dependence. It is not the proportion of subjects who have a particular pattern, and it does not say that one period’s measurement causes another. For log-scale pharmacokinetic endpoints, the covariance and variance are in squared log-scale units; the correlation is unitless.

Worked Example: Obtaining the Correlation Under a Random-Intercept Model

Suppose a hypothetical two-period crossover model estimates a subject-intercept variance of \(\tau^2=0.16\) and an error variance of \(\sigma^2=0.36\), in squared log-scale units. Find the marginal variance, covariance, and correlation between the two periods.

The marginal variance in either period is the sum of the two variance components:

$$ \operatorname{Var}(Y_{ij})=\tau^2+\sigma^2=0.16+0.36=0.52. $$

The shared subject intercept is the only component common to the two periods, so their covariance is \(\tau^2=0.16\). Therefore,

$$ \rho=\frac{0.16}{0.52}=0.3077. $$

The implied within-subject correlation is about 0.308, and the marginal standard deviation in either period is \(\sqrt{0.52}=0.7211\) log-scale units. The model requires equal variances in both periods and the same correlation for every pair of periods. These are assumptions of this hypothetical model, not conclusions established by the arithmetic.

Unstructured Covariance

For \(m\) periods, UN covariance places a separate parameter in each diagonal and each distinct off-diagonal position:

$$ \boldsymbol{\Sigma}_{UN}= \begin{pmatrix} v_1 & c_{12} & \cdots & c_{1m}\\ c_{12} & v_2 & \cdots & c_{2m}\\ \vdots & \vdots & \ddots & \vdots\\ c_{1m} & c_{2m} & \cdots & v_m \end{pmatrix}. $$

The diagonal entries \(v_j\) are period-specific variances, and \(c_{jk}\) is the covariance between periods \(j\) and \(k\). The correlation for that pair is calculated as \(\rho_{jk}=c_{jk}/\sqrt{v_jv_k}\). UN does not require equal variances or equal correlations. It does require a valid covariance matrix: for every nonzero vector \(\mathbf{a}\), \(\mathbf{a}^\mathsf{T}\boldsymbol{\Sigma}_{UN}\mathbf{a}>0\). This positive-definiteness condition ensures that no linear combination of the measurements has zero or negative variance.

With \(m\) periods, UN has \(m(m+1)/2\) covariance parameters: \(m\) variances and \(m(m-1)/2\) distinct covariances. For example, three periods require six parameters. This flexibility can describe period-specific dependence, but its estimates may be imprecise when the number of subjects is small relative to the number of covariance parameters.

Worked Example: Interpreting a Three-Period Unstructured Matrix

Suppose a hypothetical fitted UN model gives the following covariance estimates, with entries in squared log-scale units:

$$ \widehat{\boldsymbol{\Sigma}}_{UN}= \begin{pmatrix} 0.25 & 0.14 & 0.09\\ 0.14 & 0.49 & 0.21\\ 0.09 & 0.21 & 0.36 \end{pmatrix}. $$

The period-specific standard deviations are \(\sqrt{0.25}=0.5000\), \(\sqrt{0.49}=0.7000\), and \(\sqrt{0.36}=0.6000\) log-scale units. The three pairwise correlations are:

$$ \rho_{12}=\frac{0.14}{\sqrt{0.25(0.49)}}=0.4000,\qquad \rho_{13}=\frac{0.09}{\sqrt{0.25(0.36)}}=0.3000,\qquad \rho_{23}=\frac{0.21}{\sqrt{0.49(0.36)}}=0.5000. $$

The correlations differ, and so do the period variances; this matrix cannot be represented by CS. It is also necessary to check that the estimates form a valid covariance matrix. Its first two leading principal minors are \(0.25>0\) and \(0.25(0.49)-0.14^2=0.1029>0\). Its determinant is:

$$ 0.25(0.49)(0.36)+2(0.14)(0.09)(0.21) -0.25(0.21)^2-0.49(0.09)^2-0.36(0.14)^2 =0.027342>0. $$

All three leading principal minors are positive, so this symmetric matrix is positive definite. The correlations and variances can therefore be interpreted as a coherent covariance structure.

Comparing the Structures

The choice is a choice about how much within-subject dependence to allow and what patterns are plausible. CS uses fewer parameters and is interpretable as a shared subject-level contribution plus period-specific noise. UN allows each period and each pair to differ, but requires more information to estimate reliably. A simpler structure can be preferable when its restrictions are scientifically credible; a flexible structure can be useful when equal variances or equal correlations are not plausible and the data support the additional parameters.

FeatureCompound symmetryUnstructured
Period variancesEqualMay differ
Distinct-period correlationsEqualMay differ by pair
Number of covariance parametersTwo in the random-intercept form\(m(m+1)/2\) for \(m\) periods
Main practical riskOverly restrictive dependence assumptionsImprecise or unstable estimates from too many parameters

Other structured alternatives impose different patterns. For example, an autoregressive structure for equally spaced periods uses a common marginal variance and correlation \(\rho^{|j-k|}\), so correlation declines with the distance between periods. Such a structure is more restrictive than UN but is not equivalent to CS except in special cases. An independence structure sets all off-diagonal covariances to zero. These alternatives are not automatically better or worse; each encodes a different assumption about how period measurements relate.

A Numerical Comparison From Hypothetical Residuals

Consider four hypothetical subjects with residuals after fitting the same fixed mean model. The residuals for periods 1, 2, and 3 are shown below. Each column has mean zero, so the usual sample covariance calculation uses a divisor of \(n-1=3\).

SubjectPeriod 1Period 2Period 3
1122
2-10-2
3100
4-1-20

Worked Example: Comparing CS and UN Using Residual Covariances

For this illustration, calculate the empirical covariance matrix, then compare a moment-based CS summary with the UN matrix. These arithmetic summaries illustrate the structures; they are not claimed to be REML estimates.

The period 1 sum of squares is \(1^2+(-1)^2+1^2+(-1)^2=4\), so its sample variance is \(4/3=1.333\). The period 2 sum of squares is \(2^2+0^2+0^2+(-2)^2=8\), giving \(8/3=2.667\); period 3 also has sum of squares \(8\), giving \(2.667\). Each cross-product sum is 4. For example, period 1 times period 2 gives \(1(2)+(-1)(0)+1(0)+(-1)(-2)=4\), so its covariance is \(4/3=1.333\). The empirical matrix is:

$$ \widehat{\boldsymbol{\Sigma}}= \begin{pmatrix} 4/3 & 4/3 & 4/3\\ 4/3 & 8/3 & 4/3\\ 4/3 & 4/3 & 8/3 \end{pmatrix}. $$

The corresponding correlations are \((4/3)/\sqrt{(4/3)(8/3)}=0.7071\) for periods 1 and 2, the same value for periods 1 and 3, and \((4/3)/\sqrt{(8/3)(8/3)}=0.5000\) for periods 2 and 3. Thus the empirical matrix does not have the equal variances and equal correlations required by CS.

A simple moment-based CS summary uses the average diagonal and average off-diagonal entries. The average variance is \(((4/3)+(8/3)+(8/3))/3=20/9=2.222\), and the average covariance is \(4/3=1.333\). The implied common correlation is \((4/3)/(20/9)=0.6000\). CS summarizes this pattern with one variance and one common covariance, whereas UN retains the three distinct variances and three distinct covariances. With only four subjects, however, the UN values are based on limited information and should not be treated as precise population quantities.

Justification, Diagnostics, and Limitations

The CS correlation formula follows directly from the random-intercept model. For two distinct periods, the same subject effect \(b_i\) appears in both measurements, while the two period errors are independent. Hence \(\operatorname{Cov}(Y_{ij},Y_{ik})=\operatorname{Cov}(b_i+e_{ij},b_i+e_{ik})=\operatorname{Var}(b_i)=\tau^2\). Each marginal variance is \(\tau^2+\sigma^2\), so standardizing the covariance gives \(\rho=\tau^2/(\tau^2+\sigma^2)\). This also shows why CS imposes equal correlations: the shared component and total variance are the same for every period pair.

Useful diagnostics include checking whether fitted variances are near zero or very different by period, whether estimated correlations vary substantially across period pairs, and whether a UN fit is unstable, fails to converge, or approaches a singular covariance matrix. These signs do not prove that a model is wrong, but they call for scrutiny of the data, the mean model, and the covariance assumptions. Residual patterns that differ by sequence or period may indicate that a single common covariance matrix is inadequate. Formal comparisons and residual checks should be interpreted alongside scientific plausibility, not as automatic model-selection rules.

The main limitation of CS is its strong equality assumption: genuine changes in variability or dependence over periods are not represented. The main limitation of UN is parameter demand: with \(m\) periods, the number of covariance parameters grows quadratically, which can make estimates noisy or infeasible. Neither structure can compensate for a misspecified mean model, dependence between subjects, or important heterogeneity across groups that the model has excluded. In a two-period study, UN has three covariance parameters, while CS has only two; the UN model can therefore allow unequal period variances and a separately estimated covariance, but still needs enough subjects to support that flexibility.

Common Mistake

  • Wrong reasoning: “The estimated correlation is positive, so compound symmetry must be appropriate.” A positive correlation alone says nothing about whether all period variances and all pairwise correlations are equal.
  • Correction: Check the full pattern of period variances and pairwise covariances or correlations. CS is justified only when its equal-variance and equal-correlation restrictions are reasonable for the study; UN permits departures but needs adequate information and a positive-definite estimate.
  • Wrong reasoning: “UN has more parameters, so it must fit best and should always be used.” More parameters can fit observed variation more closely but can also make estimates unstable.
  • Correction: Balance plausible covariance assumptions against the information available. A fitted structure is a model-based representation, not a direct discovery of the true dependence pattern.
Key takeaway: CS imposes a common variance and a common correlation across periods; UN estimates each period variance and each distinct-period covariance separately. Convert covariances to correlations for interpretation, verify positive definiteness for UN, and choose a structure whose assumptions are both scientifically plausible and supported by the data.

Check Your Understanding

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

  1. Under a random-intercept CS model, \(\tau^2=0.09\) and \(\sigma^2=0.21\). What are the marginal variance and the correlation between distinct periods?
  2. A three-period UN estimate has \(v_1=0.16\), \(v_2=0.25\), and \(c_{12}=0.10\). Find the correlation between periods 1 and 2.
  3. How many covariance parameters does a four-period UN structure estimate?
  4. Why does a UN covariance matrix need to be positive definite?
  5. Give one reason to prefer CS over UN and one reason to prefer UN over CS.

Solutions. (1) The marginal variance is \(0.09+0.21=0.30\); the correlation is \(0.09/0.30=0.3000\). (2) \(\rho_{12}=0.10/\sqrt{0.16(0.25)}=0.10/0.20=0.5000\). (3) UN estimates \(m(m+1)/2=4(5)/2=10\) covariance parameters. (4) Positive definiteness guarantees that every nonzero linear combination of period measurements has positive variance, so the matrix represents a valid covariance structure. (5) CS may be preferable because it uses fewer parameters and is reasonable when variances and correlations are similar; UN may be preferable when those quantities plausibly differ across periods and enough subjects are available to estimate them.