Why Derive the Contrast?
In a two-period TR/RT crossover, each participant receives both treatments, but in opposite orders across the two sequences. A response measured in period 1 may differ from one measured in period 2 even if the treatment has no effect. The treatment contrast therefore needs to separate the treatment difference from a period difference. The key is to compare treatments within each sequence and then average the two sequence-specific contrasts with equal weight.
This derivation makes precise how the within-subject comparison relates to the four observed treatment-by-period means. It builds on the earlier material on the bioequivalence crossover estimand, within-subject comparisons, period effects, and sequence effects. Here, the target is the algebra that yields the treatment contrast under a stated model.
The Four Cell Means and the Model
Write \(Y_{isp}\) for the response from subject \(i\) in sequence \(s\) and period \(p\). Let \(T\) denote the test treatment and \(R\) the reference treatment. The four observed cells are: \(T\) in period 1 for sequence TR; \(R\) in period 2 for sequence TR; \(R\) in period 1 for sequence RT; and \(T\) in period 2 for sequence RT. Denote the corresponding cell means by \(\bar{Y}_{TR,1}\), \(\bar{Y}_{TR,2}\), \(\bar{Y}_{RT,1}\), and \(\bar{Y}_{RT,2}\).
The derivation uses an additive model with a common treatment effect and no carryover. One convenient representation is
where \(\mu\) is an overall level, \(\gamma_s\) is a sequence effect, \(b_{i(s)}\) is a subject effect within sequence, \(\pi_p\) is a period effect, and \(\tau_{d(s,p)}\) is the direct effect of the treatment administered in that period. The residual \(\varepsilon_{isp}\) has mean zero. The treatment contrast of interest is \(\theta=\tau_T-\tau_R\).
Taking expectations over subjects and residuals gives the four model means. The subject term has mean zero in this representation, while each sequence effect is shared by the two period observations from subjects in that sequence.
Deriving the Balanced Contrast
Within sequence TR, subtract the period 2 reference mean from the period 1 test mean. The common sequence effect and overall level cancel, leaving the treatment contrast plus the period difference. Within sequence RT, subtract the period 1 reference mean from the period 2 test mean. This reverses the sign of the period difference.
Give each sequence-specific contrast one-half weight. The period terms then sum to zero, so the expected value of the resulting contrast is \(\theta\). The algebra also shows why the cancellation depends on equal weighting: the two period differences have opposite signs.
For a balanced design, with the same number of complete subjects in TR and RT, this is also the difference between the equally weighted treatment means and the equally weighted reference means. Each treatment appears in both periods, and the equal sequence sizes give equal weight to the two period-specific contributions.
This equality is useful, but it does not make arbitrary pooling safe. The simple contrast has a clear interpretation because both sequences contribute equally. If sequence sizes differ, a treatment mean pooled over all observed test responses and a reference mean pooled over all observed reference responses can give unequal weights to the sequences.
Worked Example: Cancelling a Period Difference
Suppose a hypothetical balanced study has 10 complete subjects in each sequence. The four response means, measured in a common response unit, are \(\bar{Y}_{TR,1}=105\), \(\bar{Y}_{TR,2}=96\), \(\bar{Y}_{RT,1}=100\), and \(\bar{Y}_{RT,2}=103\). Calculate the balanced treatment contrast.
The TR sequence contrast is \(105-96=9\) response units. The RT sequence contrast, written as test minus reference, is \(103-100=3\) response units. The equal-weight contrast is
Equivalently, the equally weighted test mean is \((105+103)/2=104\), and the equally weighted reference mean is \((96+100)/2=98\). Their difference is \(104-98=6\) response units. The sequence contrasts are 9 and 3 because the period difference contributes in opposite directions; equal weighting removes that contribution from the combined contrast.
What Balance Does—and Does Not—Guarantee
In a balanced design, the pooled treatment-mean difference and the equal-weight sequence contrast are algebraically identical. In an unbalanced design, those calculations need not agree. The following hypothetical cell means show the issue: suppose there are six complete TR subjects and two complete RT subjects, with cell means still equal to 105, 96, 100, and 103, respectively. The equal-weight sequence contrast remains
But pooling individual responses across the unequal sequence sizes gives a different contrast. The test mean is \((6(105)+2(103))/8=104.5\), and the reference mean is \((6(96)+2(100))/8=97\). The pooled difference is \(104.5-97=7.5\) response units. The discrepancy arises because the pooled means assign six-eighths of their weight to TR and two-eighths to RT, rather than giving both sequences one-half weight. In an unbalanced analysis, a model-based, sequence-adjusted contrast may be appropriate; the unadjusted pooled difference should not be assumed to have the desired balance properties.
Worked Example: Checking the Contrast From Subject Differences
Consider a hypothetical balanced study with two subjects in each sequence. For TR subjects, the paired responses \((T\text{ in period 1},R\text{ in period 2})\) are \((110,100)\) and \((102,99)\), in response units. Their test-minus-reference differences are \(10\) and \(3\), with mean \((10+3)/2=6.5\).
For RT subjects, the paired responses \((R\text{ in period 1},T\text{ in period 2})\) are \((95,101)\) and \((98,103)\). Their test-minus-reference differences are \(101-95=6\) and \(103-98=5\), with mean \((6+5)/2=5.5\). Averaging the two sequence means equally gives
The four cell means confirm the result: \(\bar{Y}_{TR,1}=106\), \(\bar{Y}_{TR,2}=99.5\), \(\bar{Y}_{RT,1}=96.5\), and \(\bar{Y}_{RT,2}=102\). Substitution gives \(\frac{1}{2}[(106-99.5)+(102-96.5)]=\frac{1}{2}(6.5+5.5)=6\) response units. This check connects the subject-level paired differences to the four-cell formula.
Interpretation, Diagnostics, and Alternatives
The calculated contrast estimates the test-minus-reference difference in the response scale used. A positive value means the estimated test response is higher; a negative value means it is lower. The number alone does not establish statistical significance or bioequivalence. For a log-transformed pharmacokinetic response, the contrast is on the log scale; interpreting it as a ratio requires exponentiation and the corresponding analysis.
Before relying on the simple formula, check that the analyzed data retain the design structure: each included subject has observations in both periods, sequence labels and treatment assignments are correct, and sequence sizes are equal if the pooled-mean identity is being used. Inspect the four cell means and the two sequence-specific differences. A striking disagreement between sequence-specific differences can signal sampling variability or a departure from the common additive treatment-effect model. The contrast alone cannot diagnose the cause.
The main alternatives are to report the two sequence-specific contrasts separately or to estimate the treatment contrast from a model that includes sequence, period, and treatment terms. Separate contrasts make their disagreement visible, but do not provide a single combined estimate. A model-based contrast can handle unequal sequence sizes and adjust for modeled effects, but its interpretation still depends on the model and data structure. In a balanced complete design under the stated additive model, the simple equal-weight formula is transparent and agrees with the balanced pooled treatment-mean difference.
A common mistake is to subtract the two treatment means in period 1 and call that the treatment effect. In period 1, treatment is tied to sequence: TR participants receive T, while RT participants receive R. That period-specific difference can therefore include a sequence difference as well as treatment. The correction is to use both periods, form the within-sequence test-minus-reference differences, and average them equally so the period effects cancel under the model.
Check Your Understanding
Answer each question using the four-cell contrast, then compare with the solutions.
- In a balanced study, the cell means are \(\bar{Y}_{TR,1}=52\), \(\bar{Y}_{TR,2}=47\), \(\bar{Y}_{RT,1}=49\), and \(\bar{Y}_{RT,2}=50\), in response units. What is the balanced treatment contrast?
- Why do the period terms cancel when the two sequence-specific contrasts receive equal weight?
- What is the main issue with pooling all observed test responses and all observed reference responses when sequence sizes are unequal?
- Why is a period 1 test-minus-reference difference not, by itself, the crossover treatment contrast?
Solutions. (1) \(\frac{1}{2}[(52-47)+(50-49)]=\frac{1}{2}(5+1)=3\) response units. (2) The TR difference contains \(\pi_1-\pi_2\), whereas the RT test-minus-reference difference contains \(\pi_2-\pi_1\); their equal-weight sum cancels these terms. (3) Pooling weights each sequence according to its sample size, so the two sequences may not contribute equally and period effects may not cancel as in the balanced contrast. (4) Period 1 assigns T to TR and R to RT, so the observed difference can include a sequence difference as well as a treatment difference.