Why Covariance Matters in Replicate Responses
A replicate crossover records more than one response after at least one formulation. Those measurements from the same participant are not generally independent: participant characteristics that influence one response may influence the others as well. Covariance describes the direction and magnitude of this linear relationship. It is needed to represent the joint data correctly and to understand why a within-participant comparison can have a different variance from a comparison of independent observations.
The schedule also matters. A covariance matrix is written for a particular ordering of measurements, usually by period. The sequence tells us which entries correspond to test or reference responses and which repeated responses are separated by one or more periods. The same set of treatment counts can therefore have different covariance representations under different assumptions about how dependence changes with time.
Let \(Y_{ij}\) denote participant \(i\)'s response in period \(j\), with the response defined here as a log-transformed pharmacokinetic measure. Let \(d_{ij}\) identify the formulation given in that period. A useful starting model separates systematic means from shared participant variation and period-specific variation:
Here \(\mu\) is an overall mean, \(\theta_{d_{ij}}\) is the formulation effect, and \(\pi_j\) is the period effect. The participant effect \(b_i\) represents a participant’s tendency to have higher or lower responses across periods. In the simple model, \(b_i\sim N(0,\sigma_b^2)\); the errors \(\varepsilon_{ij}\) are independent across periods, have mean zero and common variance \(\sigma_e^2\), and are independent of \(b_i\). Participants are independent of one another. These are modeling assumptions, not consequences of having a replicate schedule.
Covariance Under a Shared-Participant Model
The fixed mean terms do not contribute to covariance. For two different periods \(j\ne k\) from the same participant, the shared \(b_i\) contributes to both responses, while independent errors contribute no cross-period covariance. Thus the covariance is \(\sigma_b^2\). A response’s variance includes both the shared participant component and its period-specific error variance.
The corresponding correlation between any two distinct periods in this simple model is \(\sigma_b^2/(\sigma_b^2+\sigma_e^2)\). This is a compound-symmetry structure: every period has the same variance and every pair of distinct periods has the same covariance. In a real analysis, the structure must be justified for the response and design at hand; it should not be assumed merely because it is convenient.
Worked Example: Covariance and a Within-Participant Difference
Suppose a hypothetical log-response model has \(\sigma_b^2=0.36\) and \(\sigma_e^2=0.64\), in squared log-response units. Under the independent-error random-intercept assumptions, calculate the variance and correlation of two period responses from the same participant, and the variance of their difference.
Each response has variance \(0.36+0.64=1.00\). The covariance between the two periods is \(0.36\), so their correlation is \(0.36/\sqrt{1.00(1.00)}=0.36\).
For responses \(Y_{i1}\) and \(Y_{i2}\), the variance of the difference is $$ \operatorname{Var}(Y_{i1}-Y_{i2}) =\operatorname{Var}(Y_{i1})+\operatorname{Var}(Y_{i2})-2\operatorname{Cov}(Y_{i1},Y_{i2}) =1.00+1.00-2(0.36)=1.28. $$
The within-participant difference therefore has standard deviation \(\sqrt{1.28}=1.131\) log-response units. The positive covariance reduces the difference’s variance relative to the value \(2.00\) that would result if the two responses were independent. This calculation describes individual repeated responses under the stated model; it is not, by itself, a standard error for a treatment-effect estimate from a study.
Reading the Covariance Matrix Along the Schedule
For a participant with four observed periods, define the period-ordered response vector \(\mathbf{Y}_i=(Y_{i1},Y_{i2},Y_{i3},Y_{i4})^\mathsf{T}\). Under the simple shared-participant model, its covariance matrix is
The diagonal entries are period-response variances; off-diagonal entries are covariances between periods. The matrix is indexed by period, not by formulation. For a T-R-T-R schedule, periods 1 and 3 are the two test responses, and periods 2 and 4 are the two reference responses. For an R-T-R-T schedule, those formulation labels swap. Under compound symmetry, this relabeling does not change the numerical matrix, but it changes which entries are used to describe repeated test responses, repeated reference responses, or cross-formulation pairs.
That distinction becomes more consequential when dependence varies with the separation between periods. For example, one extension retains the shared participant effect but allows period errors to have an autoregressive covariance:
Here the period errors have variance \(\sigma_u^2\), and their correlation at a separation of \(h\) periods is \(\rho^h\). This model assumes a common variance and a correlation that decays geometrically with period distance. It is an alternative structure, not a universal property of crossover data. With it, treatment order identifies the period distance between repeated measurements of a formulation, so the relevant covariance can change when the schedule changes.
Worked Example: Same Replication, Different Period Separation
Consider two hypothetical four-period schedules, T-T-R-R and T-R-T-R. Suppose the period-error model above has \(\sigma_b^2=0.25\), \(\sigma_u^2=0.75\), and \(\rho=0.50\). Both schedules give two responses to each formulation. Find the covariance between the two test responses under each schedule.
In T-T-R-R, the test responses are in periods 1 and 2, one period apart. Therefore, $$ \operatorname{Cov}(Y_{i1},Y_{i2}) =0.25+0.75(0.50)^1 =0.625. $$
In T-R-T-R, the test responses are in periods 1 and 3, two periods apart. Therefore, $$ \operatorname{Cov}(Y_{i1},Y_{i3}) =0.25+0.75(0.50)^2 =0.25+0.1875 =0.4375. $$
The treatment counts are identical, but the model assigns different covariance to the repeated test responses because their period separation differs. This does not establish that one schedule is preferable. It shows why the covariance matrix must be indexed to the actual period order and why a dependence model should be stated before interpreting its entries.
Estimating and Checking Dependence
A covariance can also be summarized empirically. If \(x_i\) and \(y_i\) are paired responses from \(n\) participants, the sample covariance is $$ s_{xy}=\frac{\sum_{i=1}^{n}(x_i-\bar{x})(y_i-\bar{y})}{n-1}. $$ The pairing is essential: each \(x_i\) and \(y_i\) must come from the same participant and the intended periods or formulations. In a crossover analysis, raw responses may include systematic formulation and period means. A raw covariance can therefore combine shared participant variation with patterns in those means. Model-based covariance estimation accounts for the fixed mean structure that has been specified; a descriptive sample covariance alone does not separate these sources.
Worked Example: Sample Covariance From Paired Responses
Four hypothetical participants have paired, mean-adjusted log responses for two periods. The adjusted values are \((-0.20,-0.10)\), \((-0.10,0.00)\), \((0.10,0.00)\), and \((0.20,0.10)\). Calculate the sample covariance.
The means of both columns are zero. The four cross-products of deviations are \(0.020\), \(0\), \(0\), and \(0.020\). Thus $$ s_{xy}=\frac{0.020+0+0+0.020}{4-1} =\frac{0.040}{3} =0.01333 $$ in squared log-response units.
The positive estimate indicates that, in this small hypothetical sample, participants with higher-than-average adjusted values in one period tended also to have higher-than-average values in the other. With only four pairs, the estimate is highly uncertain; it is a descriptive calculation, not evidence that a particular covariance model is adequate.
Useful checks include plotting paired responses, examining within-participant residuals against period, and comparing residual association at different period separations. Stronger dependence for nearby periods can conflict with compound symmetry. Covariances that differ systematically by sequence or period can also indicate that a single common covariance is inadequate, though mean-model misspecification, missing periods, or carryover may contribute to the pattern. Diagnostics should therefore be interpreted alongside the treatment and period structure rather than as a stand-alone test of a covariance model.
The main alternatives serve different purposes. Compound symmetry is parsimonious and gives a shared covariance for every pair of periods. A time-dependent structure, such as the autoregressive example, distinguishes pairs by period distance. An unstructured covariance estimates each variance and covariance separately, allowing flexibility but requiring more information and parameters. Empirical paired covariances are useful summaries, while a repeated-measures model links the covariance representation to the mean structure and the schedule. None is automatically correct: selection depends on the design, scientific assumptions, amount of data, and adequacy of diagnostics.
Interpretation, Limitations, and a Common Pitfall
Covariance is not the same as a treatment effect. A positive covariance says that paired responses tend to move together; it does not say that one formulation causes a higher response. Nor does covariance alone identify why participants’ responses are related. A shared participant effect is one explanation, while time-dependent biology, measurement conditions, or unmodeled period patterns may also contribute.
A common mistake is to say, “The two test responses are repeated, so their covariance must equal the test-response variance,” or to treat the two responses as independent because they occur in separate periods. Neither follows from replication. The variance includes all variation in one response; the covariance measures only the variation shared by the pair. Under the simple random-intercept model, these are \(\sigma_b^2+\sigma_e^2\) and \(\sigma_b^2\), respectively. The assumed error structure determines whether covariance is constant or depends on period distance.
A second pitfall is to write a covariance matrix in treatment order while silently using period-order assumptions. Always state the vector’s ordering and map each position to the schedule. Also distinguish a mathematical covariance structure from a claim about design quality: treatment order can determine which covariance entries apply, but a covariance calculation by itself does not address period balance, carryover, or the overall choice of design.
Check Your Understanding
Answer each question, then compare with the brief solutions below.
- Under the independent-error random-intercept model, what are the covariance and correlation between two distinct period responses from one participant?
- If two responses each have variance 1.5 and covariance 0.4, what is the variance of their difference?
- In a four-period T-R-T-R schedule, which periods contain the repeated test responses? Why should a covariance matrix state its ordering?
- Under an autoregressive period-error model, does a pair of responses one period apart have the same covariance as a pair two periods apart when \(0<\rho<1\) and \(\sigma_u^2>0\)?
Solutions. (1) The covariance is \(\sigma_b^2\), and the correlation is \(\sigma_b^2/(\sigma_b^2+\sigma_e^2)\). (2) The difference variance is \(1.5+1.5-2(0.4)=2.2\). (3) The repeated test responses are in periods 1 and 3; ordering identifies which matrix entries refer to those measurements. (4) No. The period-error contributions are \(\sigma_u^2\rho\) and \(\sigma_u^2\rho^2\), respectively, so they differ under the stated conditions.