Tutorials › Bioavailability and Bioequivalence › Deriving the Treatment Contrast in a Two-Period Crossover

Log-Scale Analysis and ANOVA · Tutorial 179 of 399

Deriving the Treatment Contrast in a Two-Period Crossover

Learn why the difference between the two sequence-specific period differences, divided by two, estimates the test-versus-reference effect in a two-period crossover.

Intermediate 10 min read

What You'll Learn

  • Define the treatment contrast on the log scale as test minus reference.
  • Derive the contrast from the period differences in the TR and RT sequences.
  • Calculate the estimate from subject-level log exposures in a balanced crossover.
  • Separate the treatment contrast from the period difference.
  • Back-transform the log contrast to a test-to-reference geometric mean ratio.
  • Recognize assumptions and data problems that can undermine the estimate.

Why the Sequence-Specific Differences Matter

In a two-period crossover, each participant receives both the test treatment and the reference treatment, but in an assigned order. A participant in the TR sequence receives test in period 1 and reference in period 2; a participant in the RT sequence receives reference in period 1 and test in period 2. The observed outcome might be the natural logarithm of AUC or another positive pharmacokinetic exposure measure.

The crossover structure makes a within-participant comparison possible: subtract each participant’s period 2 log exposure from their period 1 log exposure. But the sign of the treatment contribution to that difference depends on sequence. In the TR sequence, period 1 is test; in the RT sequence, period 1 is reference. Comparing the average differences across sequences therefore separates the treatment contrast from the period difference.

Definition: Let \(\delta\) denote the treatment contrast on the log scale, defined as the test-treatment effect minus the reference-treatment effect. Its estimate is one-half the difference between the mean period 1 minus period 2 differences in the TR and RT sequences. Exponentiating \(\delta\) gives the test-to-reference geometric mean ratio.

Model and Derivation

Use the classical two-period crossover model described in the earlier material on the Classical Two-Period Crossover ANOVA Model. For the endpoint \(y\), let \(y_{ijk}\) be the log exposure for subject \(j\) in sequence \(i\) and period \(k\). A useful parameterization is

$$ y_{ijk}=\mu+S_i+B_{j(i)}+\pi_k+\tau_{t(i,k)}+\varepsilon_{ijk}, $$

where \(\mu\) is an overall level, \(S_i\) is the sequence effect, \(B_{j(i)}\) is the subject effect for subject \(j\) nested within sequence \(i\), \(\pi_k\) is the period effect, and \(\tau_{t(i,k)}\) is the effect of the treatment received in that period. The residual is \(\varepsilon_{ijk}\). Define \(\delta=\tau_T-\tau_R\), where \(T\) and \(R\) denote test and reference. The model assumes a common treatment contrast across periods and sequences, no carryover effect into period 2, and additive sequence, subject, period, and treatment effects. For the usual classical inference, residuals are also assumed independent between subjects, normally distributed, and to have a common variance.

The estimate’s algebra follows by taking each subject’s period 1 minus period 2 difference. Write \(d_{ij}=y_{ij1}-y_{ij2}\). The overall level, sequence effect, and subject effect cancel within a subject. Let \(\Delta_\pi=\pi_1-\pi_2\). In the TR sequence the treatment contribution is \(\tau_T-\tau_R=\delta\), whereas in the RT sequence it is \(\tau_R-\tau_T=-\delta\). Thus the model implies:

$$ \begin{aligned} E(d_{TR})&=\Delta_\pi+\delta,\\ E(d_{RT})&=\Delta_\pi-\delta. \end{aligned} $$

Let \(\bar d_{TR}\) and \(\bar d_{RT}\) be the sample mean differences for the two sequences. Subtracting their model means removes the common period difference; dividing by two leaves the treatment contrast. Adding the means instead removes the treatment contribution and gives the period difference:

$$ \hat{\delta}=\frac{\bar d_{TR}-\bar d_{RT}}{2}, \qquad \widehat{\Delta_\pi}=\frac{\bar d_{TR}+\bar d_{RT}}{2}. $$

This is a derivation of the point estimate, not a standard error or hypothesis test. It shows exactly why the two sequence-specific differences must be compared rather than interpreting either one as the treatment effect by itself.

Worked Calculation from Subject-Level Data

Worked Example: A Balanced Log-Exposure Dataset

Suppose, hypothetically, three participants are assigned to each sequence. The entries below are natural-log exposure values, and each pair is listed in period order. All values are illustrative.

SequenceSubjectPeriod 1Period 2\(d=y_1-y_2\)
TR14.804.550.25
TR25.104.900.20
TR34.604.500.10
RT44.704.90-0.20
RT55.005.15-0.15
RT64.404.50-0.10

For TR, the mean period difference is \(\bar d_{TR}=(0.25+0.20+0.10)/3=0.1833\). For RT, it is \(\bar d_{RT}=(-0.20-0.15-0.10)/3=-0.1500\). The treatment contrast estimate is therefore

$$ \hat{\delta}=\frac{0.1833-(-0.1500)}{2} =\frac{0.3333}{2}=0.1667. $$

The estimated log test-to-reference contrast is 0.1667. Back-transforming gives \(\exp(0.1667)=1.181\), an estimated test-to-reference geometric mean ratio of 1.181, or about 118.1%. This is a ratio, not a difference in exposure units. The corresponding estimated period difference is \((0.1833-0.1500)/2=0.01667\) log units. The result is an estimate, not by itself evidence that the treatments differ; uncertainty would need to be assessed separately.

Interpreting the Contrast and the Role of Balance

In a balanced design with the same number of complete participants in each sequence, the contrast can also be expressed using sequence-by-period cell means. Denote these means by \(\bar y_{TR,1}\), \(\bar y_{TR,2}\), \(\bar y_{RT,1}\), and \(\bar y_{RT,2}\). The estimate is

$$ \hat{\delta} =\frac{1}{2}\left[ (\bar y_{TR,1}-\bar y_{TR,2}) -(\bar y_{RT,1}-\bar y_{RT,2}) \right]. $$

Equivalently, form the mean log exposure for test by averaging the TR period 1 mean and the RT period 2 mean, and form the mean for reference by averaging the TR period 2 mean and the RT period 1 mean. Their difference equals \(\hat{\delta}\) when the sequence contributions are equally weighted. Because the data are on the log scale, exponentiating this difference produces a ratio of geometric means, not a difference between arithmetic means.

Worked Example: Separating Treatment and Period Effects

Suppose a hypothetical balanced study gives mean period differences of 0.30 log units for TR and 0.10 log units for RT. These might be based on individual differences such as 0.28 and 0.32 in TR, and 0.08 and 0.12 in RT.

The treatment contrast is

$$ \hat{\delta}=\frac{0.30-0.10}{2}=0.10. $$

The estimated period 1 minus period 2 effect is

$$ \widehat{\Delta_\pi}=\frac{0.30+0.10}{2}=0.20. $$

The TR difference of 0.30 is not the treatment contrast: it includes both the 0.20 period difference and the 0.10 treatment contrast. The RT difference also includes the period effect, but its treatment contribution has the opposite sign. The estimated test-to-reference geometric mean ratio is \(\exp(0.10)=1.105\), or about 110.5%.

Worked Example: Checking the Cell-Mean Form

Consider hypothetical balanced sequence-by-period log-exposure means: TR period 1 is 5.20, TR period 2 is 5.00, RT period 1 is 4.90, and RT period 2 is 5.20. The sequence-specific differences are \(5.20-5.00=0.20\) and \(4.90-5.20=-0.30\). Therefore,

$$ \hat{\delta}=\frac{0.20-(-0.30)}{2}=0.25. $$

The marginal test mean is \((5.20+5.20)/2=5.20\); the marginal reference mean is \((5.00+4.90)/2=4.95\). Their difference is \(5.20-4.95=0.25\), matching the sequence-difference calculation. Exponentiating gives \(\exp(0.25)=1.284\), an estimated test-to-reference geometric mean ratio of 1.284. The period difference estimate is \((0.20-0.30)/2=-0.0500\) log units.

Assumptions, Diagnostics, and Alternatives

The contrast’s cancellation argument depends on the model, not simply on having two measurements per participant. In particular, the same period effect must apply to both sequences, and the treatment contrast must be interpretable as common across periods. If treatment effects differ by period, the two sequence-specific differences no longer have the simple shared-\(\delta\) form above. Carryover, such as a residual effect of period 1 treatment on period 2 exposure, also violates the stated model and can distort the contrast.

Before interpreting the estimate, verify that each included participant has both period measurements and that the sequence and treatment assignments are correctly coded. Calculate the differences in the prespecified direction, period 1 minus period 2, for both sequences. A sign reversal in only one sequence changes the contrast. Inspect subject-level differences by sequence for unusual values or patterns; examine whether there is evidence of markedly different spread or influential observations. Such checks can reveal data problems or departures from the model, but they do not prove the assumptions hold. Normality and common-variance assumptions primarily support the classical inferential calculations, while the additive model and absence of carryover are central to interpreting the contrast.

For complete, balanced data, the sequence-difference calculation is a transparent way to see the estimate. The corresponding classical crossover ANOVA expresses the same treatment contrast within the model framework. A subject-level comparison is also useful because it makes clear that each participant serves as their own control. By contrast, treating test and reference observations as independent groups discards the pairing and does not reproduce the crossover contrast. The derivation here addresses the estimate; the choice of its inferential error term and degrees of freedom is a separate issue.

Balance makes the cell-mean interpretation especially direct. If sequence sizes differ, the sequence-specific mean differences can still be used in the displayed contrast under the stated common additive model, but an unadjusted comparison of pooled test and reference means can weight periods unevenly. Missing periods also prevent a complete within-subject difference for the affected participant; simply dropping or imputing observations without considering the design may change the analysis. These are reasons to follow the prespecified model rather than selecting whichever mean comparison is easiest to calculate.

Common Mistakes

  • Using one sequence’s period difference as the treatment effect. The TR difference contains both treatment and period contributions. The RT difference contains the same period contribution but the opposite treatment contribution. Use half their difference.
  • Forgetting the factor of one-half. The difference between the sequence means is \(2\delta\), so divide by two to estimate \(\delta\).
  • Reversing the direction inconsistently. Define both differences as period 1 minus period 2. If the direction is changed, change it for both sequences and keep the treatment contrast’s sign convention explicit.
  • Interpreting a log contrast as a percent difference directly. Exponentiate first to obtain the test-to-reference geometric mean ratio; a ratio of 1.105 corresponds to about 110.5%, not a difference of 1.105 exposure units.
  • Assuming cancellation fixes every design problem. The derivation does not remove carryover, treatment-by-period interaction, miscoding, or missing-data concerns.
Key takeaway: With the period difference defined as period 1 minus period 2, the test-minus-reference log contrast is \((\bar d_{TR}-\bar d_{RT})/2\). The sum of those sequence means, divided by two, estimates the period 1 minus period 2 effect. Exponentiate the treatment contrast to report the test-to-reference geometric mean ratio.

Check Your Understanding

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

  1. In a balanced crossover, \(\bar d_{TR}=0.24\) and \(\bar d_{RT}=-0.06\). Calculate the log treatment contrast and the period 1 minus period 2 difference.
  2. If the estimated log treatment contrast is \(-0.12\), what is the estimated test-to-reference geometric mean ratio, to three significant figures?
  3. Why is the TR mean period difference alone not generally an estimate of the treatment contrast?
  4. Name two model conditions needed for the sequence-difference derivation to have its stated interpretation.

Solutions. (1) The treatment contrast is \([0.24-(-0.06)]/2=0.150\) log units; the period difference is \([0.24+(-0.06)]/2=0.0900\) log units. (2) \(\exp(-0.12)=0.887\), so the estimated test-to-reference geometric mean ratio is 0.887. (3) The TR difference combines the period 1 minus period 2 effect with the test-minus-reference treatment contrast; it does not separate them. (4) Examples include a common additive period effect across sequences, a common treatment contrast across periods, and no carryover into period 2.