Tutorials › Bioavailability and Bioequivalence › Subject-Level Log Ratios in a Crossover Study

Log-Scale Analysis and ANOVA · Tutorial 177 of 399

Subject-Level Log Ratios in a Crossover Study

You will calculate subject-level log contrasts from paired crossover measurements and distinguish baseline cancellation from adjustment for period or other design effects.

Intermediate 10 min read

What You'll Learn

  • Calculate a subject’s test-to-reference log ratio from positive paired endpoint measurements.
  • Explain why subtracting log measurements cancels a subject-level additive baseline.
  • Convert a mean log contrast into a geometric mean test-to-reference ratio.
  • Recognize how period order can remain in a within-subject contrast.
  • Diagnose common pairing, scale, and interpretation errors.

Why Form a Within-Subject Log Contrast?

In a crossover study, each subject receives both the test formulation and the reference formulation, usually in different periods. This creates a natural paired comparison: the two measurements belong to the same subject, but correspond to different treatments. Comparing the measurements within a subject can remove a stable subject-level difference in baseline exposure. Taking logarithms makes that cancellation especially clear when baseline differences act multiplicatively on the original scale.

The calculation in this tutorial is a subject-level contrast, not a complete analysis of a crossover study. It does not by itself adjust for period effects, sequence effects, or carryover. The distinction matters: cancellation of a subject baseline is an algebraic property of a paired contrast, whereas interpreting that contrast as a treatment effect also depends on the design and its assumptions.

Definition: For subject \(i\), let \(T_i\) and \(R_i\) be the positive measurements of the same pharmacokinetic endpoint under the test and reference formulations, respectively. The subject-level test-to-reference log ratio is $$ d_i=\ln(T_i)-\ln(R_i)=\ln\!\left(\frac{T_i}{R_i}\right). $$ It is dimensionless. The corresponding ratio on the original scale is \(T_i/R_i=\exp(d_i)\).

The endpoint must be measured on a ratio scale for the ratio to be meaningful, and both values must use the same units. For example, \(T_i\) and \(R_i\) might both be AUC measurements in \(\mathrm{ng\cdot h/mL}\). Their ratio has no units, so its logarithm is also dimensionless. A zero or negative measurement cannot be logged; such values require a scientifically justified handling strategy rather than an arbitrary calculation.

Calculating the Subject-Level Contrast

The calculation has two equivalent routes. One may subtract the two natural logarithms, or first divide the test measurement by the reference measurement and then take the natural logarithm. The second route makes the direction of comparison explicit: positive \(d_i\) means \(T_i>R_i\), negative \(d_i\) means \(T_i<R_i\), and \(d_i=0\) means the measurements are equal.

Worked Example: Four Paired Endpoint Measurements

Suppose four hypothetical subjects complete a crossover study, with both AUC measurements expressed in \(\mathrm{ng\cdot h/mL}\). The table reports each subject’s paired reference and test values. The log ratios below are calculated from the unrounded ratios.

Subject\(R_i\) (ng·h/mL)\(T_i\) (ng·h/mL)\(T_i/R_i\)\(d_i=\ln(T_i/R_i)\)
11001101.100.09531018
2100900.90−0.10536052
32002201.100.09531018
4100950.95−0.05129329

For subject 1, for example,

$$ d_1=\ln(110)-\ln(100)=\ln(110/100)=\ln(1.10)=0.09531018. $$

The mean of the four individual log ratios is

$$ \bar d =\frac{0.0953101798-0.1053605157+0.0953101798-0.0512932944}{4} =\frac{0.0339665495}{4} \approx 0.00849164. $$

Back-transforming this mean gives \(\exp(0.00849164)\approx1.00853\), or a geometric mean test-to-reference ratio of about 1.00853 (100.853%). This is a summary of these four paired ratios; it is not a claim that every subject’s ratio is near 1.00853, nor is it an inferential conclusion about a population.

Why the Subject Baseline Cancels

A useful way to understand the contrast is to represent a subject’s measurements on the log scale as a common subject component plus terms that can differ between the two observations. The common component may reflect stable characteristics that make one subject’s exposure generally higher or lower than another’s. The cancellation does not require estimating that component.

$$ \ln(T_i)=b_i+\tau_T+u_{iT}, \qquad \ln(R_i)=b_i+\tau_R+u_{iR}, $$

where \(b_i\) is the subject-specific baseline on the log scale, \(\tau_T\) and \(\tau_R\) represent treatment-related components, and \(u_{iT}\) and \(u_{iR}\) collect other components of the two observations. Subtracting the second equation from the first gives

$$ d_i=(b_i-b_i)+(\tau_T-\tau_R)+(u_{iT}-u_{iR}) =(\tau_T-\tau_R)+(u_{iT}-u_{iR}). $$

Thus the common \(b_i\) disappears. On the original scale, a common baseline multiplier has the same effect. If a subject’s test and reference measurements are both multiplied by \(c_i>0\), then

$$ \ln\!\left(\frac{c_iT_i}{c_iR_i}\right) =\ln\!\left(\frac{T_i}{R_i}\right). $$

This is the central justification for forming a within-subject log ratio: a stable multiplicative difference that affects both measurements equally does not affect the contrast. It does not imply that all sources of variability disappear. Measurement error, period-related changes, treatment-by-period effects, and other differences between observations remain in \(d_i\).

Worked Example: The Same Ratio at Different Baseline Levels

Consider two hypothetical subjects whose test measurement is 20% higher than their reference measurement. Subject A has \(R_A=80\) and \(T_A=96\) \(\mathrm{ng\cdot h/mL}\); subject B has \(R_B=200\) and \(T_B=240\) \(\mathrm{ng\cdot h/mL}\). Their reference exposures differ substantially, but their paired ratios are the same:

$$ \frac{T_A}{R_A}=\frac{96}{80}=1.20, \qquad d_A=\ln(1.20)\approx0.182322, $$
$$ \frac{T_B}{R_B}=\frac{240}{200}=1.20, \qquad d_B=\ln(1.20)\approx0.182322. $$

The larger baseline for subject B changes both of that subject’s measurements by the same factor relative to subject A, but it does not change the within-subject log ratio. This illustrates baseline cancellation when the difference is multiplicative. It does not mean the two subjects have identical pharmacokinetics in every respect; it means their test-to-reference contrasts are identical in this example.

Period Order Is Not Automatically Removed

A crossover pair combines treatment with the periods in which the treatments were received. The subject baseline cancels whether test is given first or second, but a period difference generally does not. A simple hypothetical illustration makes the distinction visible. Suppose the log measurement contains a subject baseline \(b_i\), a test effect \(\delta=\ln(1.10)=0.095310\), and a period-2 contribution of \(0.04\), with no other deviations in this illustration.

Worked Example: A Period Contribution Remains in the Contrast

For a subject receiving test in period 1 and reference in period 2, write the two log measurements as \(\ln(T_i)=b_i+\delta\) and \(\ln(R_i)=b_i+0.04\). Therefore,

$$ d_i=(b_i+\delta)-(b_i+0.04) =0.095310-0.04 =0.055310. $$

For a subject receiving reference in period 1 and test in period 2, the corresponding values are \(\ln(R_i)=b_i\) and \(\ln(T_i)=b_i+\delta+0.04\). This time,

$$ d_i=(b_i+\delta+0.04)-b_i =0.095310+0.04 =0.135310. $$

In both cases \(b_i\) cancels, but the period contribution enters with a different sign according to treatment order. These constructed values are not a method for adjusting period effects. They show why a set of subject-level contrasts alone should not be mistaken for a complete crossover analysis.

Assumptions, Checks, and Alternatives

The arithmetic definition of \(d_i\) needs only positive, correctly paired measurements of the same endpoint on a common scale. Its scientific interpretation needs more. The pair must truly represent the same subject under the two formulations; endpoint definitions, units, and transformations must match; and both values must be usable. For interpreting the contrast as reflecting formulation rather than other systematic differences, the crossover design must also be appropriate. In particular, period and sequence features, carryover, and departures from the intended treatment schedule cannot simply be assumed away because a ratio was calculated.

A practical audit should check that each subject has one correctly identified test value and one reference value, that the treatment labels reflect what was actually administered, and that the endpoint values are positive and expressed in the same units. Recalculate a few ratios directly from the source measurements. A sign that is opposite to the expected direction often indicates the ratio was reversed. A contrast of \(\ln(R_i)-\ln(T_i)\) is mathematically valid, but it is the reference-to-test contrast and has the opposite sign; its direction must be stated consistently.

The log difference and the log of the ratio are the same quantity, not competing methods. An unlogged difference \(T_i-R_i\), by contrast, measures an absolute change in endpoint units and does not remove a shared multiplicative baseline. Likewise, calculating separate group summaries and taking their ratio does not preserve the subject-by-subject pairing in the same way. For a full crossover analysis, a model-based approach can represent design factors and within-subject variation; the subject-level ratios are useful contrasts, but they do not replace that analysis.

Common pitfall: It is incorrect to say, “The subject baseline cancels, so the log ratio is free of period effects and can be analyzed as if the study were a simple parallel comparison.” The cancellation applies only to a component common to both observations for that subject. Period contributions can enter the contrast, and the paired design still matters. Calculate the contrast with the correct treatment labels, then use an analysis appropriate to the crossover design when making population-level inferences.

Another frequent error is to average the individual ratios on the original scale and call that the back-transformed mean log ratio. In general,

$$ \exp\!\left(\frac{1}{n}\sum_{i=1}^n d_i\right) =\exp\!\left(\frac{1}{n}\sum_{i=1}^n\ln(T_i/R_i)\right) =\left(\prod_{i=1}^n\frac{T_i}{R_i}\right)^{1/n}, $$

which is the geometric mean of the subject-level ratios, not their arithmetic mean. The two summaries can differ, especially when individual ratios vary. The geometric mean ratio has a direct interpretation on the multiplicative scale and corresponds to the average log contrast after back-transformation, as in the earlier material on geometric means and log-scale estimates.

Check Your Understanding

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

  1. A subject has \(R_i=150\) and \(T_i=135\) \(\mathrm{ng\cdot h/mL}\). Calculate the test-to-reference ratio and its natural log contrast.
  2. If both measurements for a subject are multiplied by 3, what happens to the subject’s log ratio? Show the calculation.
  3. Explain why a subject-level contrast can remove a shared baseline but still contain a period contribution.
  4. For four subjects, the mean of their log ratios is \(0.02\). What is the corresponding geometric mean test-to-reference ratio, approximately?

Solutions. (1) \(T_i/R_i=135/150=0.900\), so \(d_i=\ln(0.900)\approx-0.10536\); the test measurement is 10% lower than the reference for this subject. (2) The ratio is unchanged: \((3T_i)/(3R_i)=T_i/R_i\), and therefore \(\ln((3T_i)/(3R_i))=\ln(T_i/R_i)\). (3) Subtraction removes the same subject term \(b_i\) from both log measurements, but a period term differs according to which treatment was administered in each period, so it need not cancel. (4) The back-transformed summary is \(\exp(0.02)\approx1.0202\), a geometric mean test-to-reference ratio of about 1.020 (102.02%).