Tutorials › Bioavailability and Bioequivalence › Within-Subject Correlation in Crossover PK Measurements

Log-Scale Analysis and ANOVA · Tutorial 190 of 399

Within-Subject Correlation in Crossover PK Measurements

See how within-subject correlation changes the uncertainty of log-scale treatment contrasts, and calculate the difference between paired and independence-based standard errors.

Intermediate 10 min read

What You'll Learn

  • Define within-subject correlation for paired log-exposure measurements.
  • Derive the variance of a within-participant treatment difference.
  • Calculate paired standard errors using variances and correlation.
  • Compare paired and independence-based uncertainty estimates.
  • Recognize assumptions and diagnostics that affect interpretation.
  • Distinguish a treatment contrast from a raw correlation.

Why Measurements From One Participant Are Related

In a crossover study, a participant receives more than one formulation, so the resulting log-AUC or log-Cmax measurements are not generally independent. A participant whose exposure tends to be high under one formulation may also tend to have high exposure under another. This within-subject correlation matters because treatment comparisons use information from both measurements on the same person. The relevant uncertainty depends not only on the variability of each measurement, but also on how the paired measurements vary together.

The earlier material on subject-level log ratios and crossover treatment contrasts establishes the use of within-participant log differences. Here the focus is the covariance in those paired log measurements and its effect on standard errors. The simple calculations below assume a complete two-treatment pair for each participant. If period effects are present, the treatment contrast must account for them; the simple paired formulas apply directly when there is no period effect or when the contrast has been appropriately adjusted.

Definition: For two log-exposure measurements \(Y_{iT}\) and \(Y_{iR}\) from participant \(i\), their within-subject correlation is \(\rho=\operatorname{Cov}(Y_{iT},Y_{iR})/(\sigma_T\sigma_R)\), where \(\sigma_T\) and \(\sigma_R\) are their marginal standard deviations. The within-subject treatment difference is \(D_i=Y_{iT}-Y_{iR}\). Its variance depends on both marginal variances and their covariance.

How Covariance Enters the Treatment Difference

Suppose each participant contributes one log exposure under treatment \(T\) and one under reference \(R\). Assume the participant pairs are independent of one another, with means \(\mu_T\) and \(\mu_R\), variances \(\sigma_T^2\) and \(\sigma_R^2\), and covariance \(\operatorname{Cov}(Y_{iT},Y_{iR})=\rho\sigma_T\sigma_R\). The mean treatment contrast is \(\delta=\mu_T-\mu_R\). Subtracting the two measurements within a participant gives:

$$ \begin{aligned} E(D_i)&=\mu_T-\mu_R=\delta,\\ \operatorname{Var}(D_i) &=\operatorname{Var}(Y_{iT}-Y_{iR})\\ &=\sigma_T^2+\sigma_R^2-2\operatorname{Cov}(Y_{iT},Y_{iR})\\ &=\sigma_T^2+\sigma_R^2-2\rho\sigma_T\sigma_R. \end{aligned} $$

The minus sign is important: the treatment difference subtracts one measurement from the other. Positive covariance therefore reduces the variability of the difference, because participant-specific tendencies shared across treatments cancel in the subtraction. With equal marginal variances, \(\sigma_T^2=\sigma_R^2=\sigma^2\), this becomes \(\operatorname{Var}(D_i)=2\sigma^2(1-\rho)\). If \(\rho=0\), the paired difference has the same variance as a difference between independent measurements with those marginal variances. If \(\rho\) is negative, the paired difference is more variable.

For \(n\) independent, complete pairs, the estimated treatment contrast is the mean of the \(D_i\) values. Its standard error is \(s_D/\sqrt{n}\), where \(s_D\) is the sample standard deviation of the within-subject differences. Equivalently, if the paired sample standard deviations are \(s_T\) and \(s_R\), and their sample correlation is \(r\), then:

$$ SE(\bar{D})=\frac{s_D}{\sqrt{n}}, \qquad s_D^2=s_T^2+s_R^2-2rs_Ts_R. $$

This calculation uses the observed pairs. Replacing \(r\) with zero is not a harmless simplification: it changes the estimated variance unless the within-subject covariance is in fact zero.

Worked Example: Shared Participant Variation

Suppose hypothetical log-AUC measurements follow \(Y_{iT}=\mu_T+b_i+e_{iT}\) and \(Y_{iR}=\mu_R+b_i+e_{iR}\). Assume participants are independent; \(b_i\) has variance \(0.060\); each period-specific error has variance \(0.030\); and the errors are independent of each other and of \(b_i\). These are model assumptions, not estimates from a real study.

Each marginal measurement has variance \(0.060+0.030=0.090\). The covariance between the paired measurements is \(0.060\), because \(b_i\) is their only shared random component. Thus the within-subject correlation is:

$$ \rho=\frac{0.060}{\sqrt{0.090(0.090)}}=0.6667. $$

In the within-subject difference, \(b_i\) cancels: \(D_i=(\mu_T-\mu_R)+(e_{iT}-e_{iR})\). Its variance is \(0.030+0.030=0.060\), also obtained from \(0.090+0.090-2(0.060)=0.060\). For \(n=20\) complete pairs, the standard error under these assumptions is:

$$ SE(\bar{D})=\sqrt{\frac{0.060}{20}}=\sqrt{0.003}=0.05477 \quad\text{log-AUC units}. $$

If the shared covariance were incorrectly set to zero, the variance used for one difference would be \(0.090+0.090=0.180\), and the resulting standard error would be \(\sqrt{0.180/20}=0.09487\) log-AUC units. Here that independence calculation is larger because positive shared participant variation makes paired differences more precise.

What an Independence Assumption Does

A simple comparison makes the effect clear. If there are \(n\) paired participants, and the two marginal variances are both \(\sigma^2\), the standard error for the paired mean difference is \(\sqrt{2\sigma^2(1-\rho)/n}\). Treating the two sets of measurements as independent instead uses \(\sqrt{2\sigma^2/n}\). The ratio of the independence-based standard error to the paired standard error is:

$$ \frac{\sqrt{2\sigma^2/n}} {\sqrt{2\sigma^2(1-\rho)/n}} =\frac{1}{\sqrt{1-\rho}}. $$

For positive \(\rho\), this ratio exceeds 1: in this equal-variance, complete-pair setting, ignoring the positive correlation overstates the standard error of the treatment difference. For negative \(\rho\), it understates it. This direction is specific to the paired contrast and those assumptions. In a more general model, the impact of a wrong covariance structure on a treatment standard error depends on the contrast, the design, and the pattern of observations.

The general calculation is that the variance of a linear contrast \(c^\mathsf{T}Y\) is \(c^\mathsf{T}Vc\), where \(Y\) is the vector of observations, \(c\) contains the contrast coefficients, and \(V\) is their covariance matrix. Assuming independence replaces the off-diagonal entries of \(V\) with zero. That replacement changes the contrast variance whenever those entries contribute to \(c^\mathsf{T}Vc\). The paired formula is the two-observation case with contrast coefficients \(1\) and \(-1\).

Worked Example: Paired Standard Error and Confidence Interval

Consider hypothetical summaries from \(n=24\) participants with complete treatment pairs: mean log difference \(\bar{D}=0.080\), \(s_T=s_R=0.300\) log-exposure units, and paired correlation \(r=0.600\). Assume participant pairs are independent, the paired differences are approximately normal, and the treatment contrast is not confounded by an unadjusted period effect. These assumptions support a paired \(t\) interval.

First calculate the sample variance of the paired differences and the standard error:

$$ \begin{aligned} s_D^2&=0.300^2+0.300^2-2(0.600)(0.300)(0.300)\\ &=0.090+0.090-0.108=0.072,\\ SE(\bar{D})&=\sqrt{\frac{0.072}{24}} =\sqrt{0.003}=0.05477\quad\text{log-exposure units}. \end{aligned} $$

With a paired \(t\) interval, \(df=n-1=23\). Using \(t_{0.975,23}\approx2.069\), the 95% confidence interval is:

$$ 0.080\ \pm\ 2.069(0.05477) =0.080\ \pm\ 0.1133 =[-0.0333,\ 0.1933]\quad\text{log-exposure units}. $$

If the paired measurements were instead treated as independent with equal variances, the estimated standard error would be \(\sqrt{(0.090+0.090)/24}=0.08660\) log-exposure units. The interval would be wider; using \(df=46\) for this illustrative equal-variance independent calculation gives \(0.080\pm2.013(0.08660)=[-0.0943,0.2543]\). The paired interval is narrower because the positive correlation is used. Neither interval gives a probability that the fixed treatment contrast lies within it; the confidence procedure describes the long-run coverage of intervals constructed under its assumptions.

Unequal Variances and Covariance

The equal-variance expression is useful for intuition, but it is not required. When treatment and reference measurements have different standard deviations, the covariance term still enters as \(-2\rho\sigma_T\sigma_R\). The estimated paired variance similarly uses the two different sample standard deviations. This is why the correlation alone does not determine the precision: its effect also depends on the scales of both measurements.

Worked Example: Unequal Marginal Variability

Suppose a hypothetical complete-pair data set has \(n=18\), \(s_T=0.250\), \(s_R=0.350\), and paired correlation \(r=0.400\), all in log-exposure units or dimensionless correlation units as appropriate. Assume independent participant pairs and a treatment contrast for which period effects have been appropriately handled.

The variance and standard error of the mean paired difference are:

$$ \begin{aligned} s_D^2 &=0.250^2+0.350^2-2(0.400)(0.250)(0.350)\\ &=0.0625+0.1225-0.0700=0.1150,\\ SE(\bar{D})&=\sqrt{\frac{0.1150}{18}} =0.07993\quad\text{log-exposure units}. \end{aligned} $$

Setting the covariance to zero would give \(\sqrt{(0.0625+0.1225)/18}=0.1014\) log-exposure units. The difference is not obtained by applying an equal-variance shortcut; it follows from using the observed marginal variances and their covariance.

Assumptions, Diagnostics, and Alternatives

The paired standard error \(s_D/\sqrt{n}\) requires independent participant pairs and a defined treatment contrast. A conventional paired \(t\) interval additionally relies on the distribution of participant differences being approximately normal, particularly when the number of pairs is small. The formula does not correct a treatment comparison that is confounded with period, nor does it repair an incorrect analysis of incomplete or otherwise unbalanced observations. Such designs require a model that represents the design and the covariance structure rather than mechanically applying a complete-pair formula.

Useful checks include plotting each participant's two log measurements against one another, examining the distribution of the paired differences, and calculating the sample correlation alongside the marginal standard deviations. A strong positive pattern in the paired plot is evidence against an independence assumption, though a correlation estimate from a small sample is uncertain. Also check that each plotted point really represents the intended pair and that the same log transformation and measurement units were used for both treatments. A correlation on the log scale describes linear co-variation of log exposures; it is not a treatment effect and does not establish that the formulations have similar mean exposures.

The main alternatives answer somewhat different questions. A paired analysis directly models the participant-level differences and is transparent for complete pairs under suitable assumptions. A model that treats repeated observations as independent discards their covariance; it may be a useful reference calculation, but its standard error is not generally appropriate for a crossover treatment contrast. A mixed model can represent subject-level dependence and accommodate more complex observation patterns, provided its fixed-effects and covariance assumptions are suitable. The earlier material on covariance structures and mixed-model estimation gives the relevant framework; choosing and checking that structure remains a substantive modeling decision.

Correlation estimates can be unstable in small samples, and a single correlation may not adequately describe all participants or periods. The simple paired calculation also does not automatically extend to a design with more repeated measurements, unequal covariance patterns, or missing observations. Those situations call for a model appropriate to the actual design. The essential principle remains: standard errors for treatment contrasts must reflect how measurements from the same participant covary.

Common Mistake

  • Wrong reasoning: “There are 48 measurements from 24 participants, so I can treat them as 48 independent observations.”
  • Correction: The observations are paired within participants. For a complete-pair treatment contrast, calculate the variability of the 24 within-subject differences, or use a model that represents their covariance. Counting both measurements does not make them independent.
  • Another error: “Positive correlation always makes every model-based standard error smaller.”
  • Correction: Positive correlation reduces the variance of a simple difference with coefficients \(1\) and \(-1\). For other contrasts or designs, the effect depends on the covariance matrix and contrast coefficients.
Key takeaway: For a paired log-exposure contrast, the covariance contributes \(-2\operatorname{Cov}(Y_T,Y_R)\) to the variance of each participant's difference. Using an independence assumption omits that term and can materially change the treatment standard error.

Check Your Understanding

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

  1. If two paired log measurements each have variance \(0.16\) and correlation \(0.50\), what is the variance of their difference?
  2. Why does positive within-subject correlation reduce the variance of a treatment difference?
  3. For paired data with \(s_T=0.20\), \(s_R=0.30\), \(r=0\), and \(n=25\), calculate the standard error of the mean difference.
  4. Does a positive correlation prove that the two formulations have equal mean exposure? Explain.

Solutions. 1. The covariance is \(0.50\sqrt{0.16(0.16)}=0.08\), so the difference variance is \(0.16+0.16-2(0.08)=0.16\). 2. The shared movement of the two measurements cancels when one is subtracted from the other, reducing the difference variance by twice the covariance. 3. Since \(r=0\), \(s_D^2=0.20^2+0.30^2=0.13\), so \(SE=\sqrt{0.13/25}=0.07211\) log-exposure units. 4. No. Correlation describes how paired measurements vary together, not whether their means are equal; the mean treatment contrast must be estimated and interpreted separately.