Tutorials › Bioavailability and Bioequivalence › Modeling Formulation Contrasts In Replicate Crossover Data

Model-Based Bioequivalence · Tutorial 311 of 399

Modeling Formulation Contrasts In Replicate Crossover Data

Specify a mixed model for replicate crossover data and distinguish the variance components that full and partial replication can support.

Advanced 12 min read

What You'll Learn

  • Write fixed-effect models that distinguish formulation contrasts from period and sequence effects.
  • Explain why subject effects are nested within sequence in a crossover design.
  • Use repeated administrations to estimate formulation-specific within-subject residual variability.
  • Identify which variance components are not separately estimable in a partial replicate design.
  • Diagnose confounding and interpret a model-derived formulation contrast on the exposure-ratio scale.

Why Replication Changes the Model

A crossover design compares formulations within the same subjects, while period and sequence describe when and in what order subjects receive them. Replicating a formulation adds more than another observation: it can reveal how variable repeated administrations of that formulation are within a subject. The model must therefore distinguish the average formulation contrast from period and sequence effects, and distinguish repeat-to-repeat variability from persistent differences among subjects.

The response \(Y_{ij}\) below is a continuous endpoint for subject \(i\) in period \(j\), commonly a log-transformed exposure such as AUC or \(C_{\max}\). A model for this endpoint is not a model for every concentration-time observation. If the response is a log exposure, a formulation contrast on the log scale can be exponentiated to express a geometric mean ratio.

Definition: A full replicate design administers each of the two formulations at least twice to each subject, as in sequences TRTR and RTRT. A partial replicate design repeats one formulation but administers the other only once to each subject, as in TRR, RTR, or RRT, where R is the reference and T is the test formulation. The formulations, periods, and sequences observed determine which effects and variance components the design can estimate.

In either design, formulation is a within-subject factor, period is an occasion factor, and sequence is a between-subject factor. Subject is nested within sequence: each subject follows one sequence, rather than being observed under multiple sequences. The random subject effect accounts for the fact that observations from the same subject tend to be related.

Specify the Mean Model Before the Variance Model

A useful starting point is a fixed-effects mean model with a subject random intercept:

$$ Y_{ij}=\mu+\alpha_{s(i)}+\pi_j+\Delta I(F_{ij}=T)+b_i+\varepsilon_{ij}. $$

Here \(s(i)\) is subject \(i\)'s sequence, \(F_{ij}\) is the formulation administered in period \(j\), and \(I(F_{ij}=T)\) equals 1 for test and 0 for reference. The coefficient \(\Delta\) is the adjusted test-minus-reference contrast on the response scale. The term \(\alpha_{s(i)}\) is the sequence effect, \(\pi_j\) is the period effect, \(b_i\) is a subject-specific deviation, and \(\varepsilon_{ij}\) is the within-subject occasion deviation.

For this reference-coded parameterization, \(\mu\) is the baseline intercept and \(\Delta\) is the formulation contrast. One may impose sum-to-zero constraints on the sequence and period effects, such as \(\sum_s\alpha_s=0\) and \(\sum_j\pi_j=0\), with an appropriately defined intercept. The formulation contrast must also be parameterized so it is not confounded with the intercept. Reference coding as shown does this directly; alternatively, a sum-to-zero formulation coding can be used with a compatible intercept definition. The design matrix must still be checked for full rank: constraints cannot recover a contrast that the observed sequence-period assignments do not support.

A basic random-effects specification is \(b_i\sim N(0,\sigma_b^2)\), with independent occasion errors \(\varepsilon_{ij}\sim N(0,\sigma^2_{F_{ij}})\). The latter allows residual variance to differ by formulation. Conditional on the subject effects and fixed effects, the occasion errors are assumed independent, normally distributed, and mean zero. The subject effects are assumed independent across subjects and independent of the occasion errors. These assumptions are modelling choices, not consequences of replication; residual plots and the fitted covariance structure should be examined.

A richer model may add a subject-by-formulation random effect. Such an effect represents a persistent subject-specific departure for a formulation, rather than the occasion-to-occasion error for a single administration. The distinction matters: repeated administrations can separate a stable subject-related component from occasion noise only when the design and covariance assumptions provide the necessary repeated observations. A model that includes these terms should specify their covariance structure and verify that its variance components are identifiable from the design.

Worked Example: Interpreting a Formulation Contrast

Suppose a hypothetical balanced crossover analysis of log AUC gives the following period-adjusted test-minus-reference differences for four subjects: \(0.02,\ 0.08,\ -0.01,\ 0.07\). For illustration, treat these as independent subject-level contrasts, with no additional adjustment needed after period effects have been accounted for. Calculate the mean contrast and its ratio-scale interpretation.

The estimated mean log contrast is

$$ \bar d=\frac{0.02+0.08-0.01+0.07}{4}=\frac{0.16}{4}=0.040. $$

Because the endpoint is log AUC, exponentiating gives the geometric mean ratio:

$$ \exp(\bar d)=\exp(0.040)=1.041. $$

The estimated test-to-reference geometric mean AUC ratio is 1.041, or about 4.1% higher for test. This is an estimate, not by itself a conclusion about equivalence. Its uncertainty and any prespecified equivalence limits must also be considered.

What Repeated Administrations Identify

Consider two administrations of the same formulation \(F\) by a subject, in periods \(j_1\) and \(j_2\). Subtracting the fitted fixed effects and taking the within-subject difference removes the formulation mean and the subject intercept. If period effects are also removed, the adjusted difference is

$$ D_{iF}=\varepsilon_{ij_1}-\varepsilon_{ij_2}. $$

Under independent, equal-variance occasion errors for formulation \(F\), each with variance \(\sigma_F^2\), the difference has variance

$$ \operatorname{Var}(D_{iF})=\operatorname{Var}(\varepsilon_{ij_1})+\operatorname{Var}(\varepsilon_{ij_2})=2\sigma_F^2. $$

Thus, after accounting for period, the variation in within-subject repeat differences informs the formulation-specific within-subject residual variance. If a persistent subject-by-formulation effect is shared across both administrations, it also cancels in this difference. The argument relies on independent occasion errors with the stated variance; correlated errors or unequal variances require a different covariance calculation.

A full replicate includes repeated administrations of both R and T, so it can provide repeat contrasts for both formulations and support separate estimates of \(\sigma_R^2\) and \(\sigma_T^2\), subject to the model assumptions and adequate data. A partial replicate with R repeated and T administered once provides a repeat contrast for R, but not for T. With just one T observation per subject, T-specific subject-by-formulation variation and T occasion error cannot generally be separated from each other using within-T repeats, because there are no such repeats.

Replication does not automatically identify every random-effect variance. A subject intercept, subject-by-formulation effects, and occasion errors imply a covariance pattern across periods. Whether their individual variance components can be estimated depends on which formulations are repeated, whether subjects receive both formulations, the number of subjects, and the covariance assumptions. In particular, a model may estimate the total variation associated with a single T observation without being able to divide it into stable subject-by-T variation and T occasion error.

Worked Example: Estimating Reference Within-Subject Variability

In a hypothetical partial replicate study, four subjects receive R twice. Suppose their period-adjusted log-AUC repeat differences, defined as first R minus second R, are \(0.10,\ -0.20,\ 0.20,\ -0.10\). Estimate the within-subject residual variance and standard deviation for R using the sample variance of the differences.

The mean difference is \(\bar D=(0.10-0.20+0.20-0.10)/4=0\). The sample variance of the differences is

$$ s_D^2=\frac{(0.10-0)^2+(-0.20-0)^2+(0.20-0)^2+(-0.10-0)^2}{4-1} =\frac{0.10}{3}=0.03333. $$

Since \(\operatorname{Var}(D)=2\sigma_R^2\), the estimated within-subject variance is

$$ \widehat{\sigma_R^2}=\frac{s_D^2}{2}=\frac{0.03333}{2}=0.01667, \qquad \widehat{\sigma_R}=\sqrt{0.01667}=0.1291. $$

The estimated within-subject standard deviation for R is 0.1291 log-AUC units. The design does not provide an analogous T repeat difference, so this calculation does not estimate a separate T within-subject residual variance.

Worked Example: Full Versus Partial Replication

Consider a hypothetical study with one endpoint per period. In a full replicate, each subject receives R twice and T twice. In a partial replicate, each subject receives R twice and T once. Assume the period-adjusted, same-formulation repeat errors are independent with a common variance within each formulation.

Full replicate. For subjects with two R administrations, form \(D_{iR}\); for the same subjects' two T administrations, form \(D_{iT}\). The model implies \(\operatorname{Var}(D_{iR})=2\sigma_R^2\) and \(\operatorname{Var}(D_{iT})=2\sigma_T^2\). Both formulation-specific repeat variances can therefore be informed by within-formulation differences.

Partial replicate. The repeated R administrations still provide \(D_{iR}\), and thus information about \(\sigma_R^2\). There is only one T administration per subject, so no \(D_{iT}\) exists. The data alone do not supply a T repeat variance. Assuming \(\sigma_T^2=\sigma_R^2\) would permit a shared-variance model, but that equality is an additional assumption, not a finding established by the partial replicate pattern.

Both designs can estimate an average formulation contrast when their sequence-period assignments provide the required comparisons. The difference is which within-formulation repeat information is available, not whether a mean contrast is inherently possible.

Sequence, Period, and Formulation Must Be Separated

Sequence effects describe average differences between groups assigned to different treatment orders; they are not within-subject formulation effects. Period effects describe systematic changes over study occasions that affect subjects regardless of formulation. The formulation contrast is the adjusted difference between T and R. In a crossover analysis these terms may be correlated in the observed design, so the model should represent the actual assignment pattern rather than treating all observations as independent.

A practical check is to construct the fixed-effects design matrix using the planned sequence, period, and formulation labels, then verify that the formulation contrast is estimable. In a well-formed conventional two-formulation crossover, subjects receive both formulations, supporting a within-subject comparison; nevertheless, an incomplete or altered assignment pattern can create aliasing. If a period has only one formulation across the entire study, for example, a period difference and formulation difference may be inseparable.

Likewise, including fixed subject indicators alongside fixed sequence effects can make sequence effects unidentifiable: each subject belongs to only one sequence, so subject indicators can reproduce the sequence labels. A random subject effect nested within sequence is a common alternative when sequence is to be estimated as a fixed between-subject effect. The choice should follow the estimand and design, not an automatic rule to add every possible term.

Worked Example: Checking the Fixed-Effect Contrast

Suppose a hypothetical four-period full replicate assigns subjects to TRTR or RTRT. Use the reference-coded model with \(I(F=T)=1\) for T and 0 for R. For the TRTR sequence, the formulation indicator by period is \(1,0,1,0\); for RTRT it is \(0,1,0,1\). Each subject receives both formulations, and each period contains observations under both formulations across the two sequences.

The adjusted formulation coefficient is the coefficient multiplying the indicator \(I(F=T)\). With period effects represented separately, it compares test with reference while accounting for period. The alternating pattern means formulation is not identical to period: for example, period 1 has T in one sequence and R in the other. Thus the formulation column is not simply a copy of a period column, and the contrast is supported by the assignment pattern.

If instead every subject received R in periods 1 and 2 and T in periods 3 and 4, formulation would be completely determined by period. A formulation contrast could not be separated from period effects in that design: changing the formulation coefficient could be offset by changing the period coefficients, leaving fitted values unchanged. The remedy is not a different constraint alone; the design must contain comparisons that distinguish the effects.

Diagnostics, Alternatives, and Limitations

After fitting a model, inspect residuals by formulation, period, and sequence for shifts, trends, and changes in spread. Compare observed and fitted within-subject repeat differences, especially for each replicated formulation. A variance estimate at a boundary, a nearly singular random-effects covariance estimate, or a large sensitivity of the formulation contrast to minor covariance changes can indicate that the model is too elaborate for the replication pattern. Such symptoms do not prove a particular component is zero; they signal weak information or an inadequate covariance specification.

A simpler alternative for a balanced design is to calculate subject-level formulation contrasts after accounting for period and analyze those contrasts. This makes the within-subject comparison transparent but may not use all observations as flexibly as a mixed model, particularly with unequal replication or more complicated period patterns. A mixed model can represent period effects and distinct residual variances directly, but its conclusions depend on the specified random-effects and residual covariance assumptions. Neither approach can recover a variance component that the design does not identify.

The endpoint model also has limits. It treats the chosen log exposure as the response and does not, by itself, validate the concentration-time model or account for uncertainty from estimating exposure from concentrations. The standard deviation of repeat differences concerns within-subject repeatability under the assumed model; it is not automatically the same quantity as persistent subject-by-formulation heterogeneity. That distinction should be kept explicit when the scientific question concerns individual responses rather than average exposure.

Common pitfall: It is incorrect to claim that a partial replicate estimates separate within-subject variances for both formulations simply because every subject receives both formulations. The test formulation is observed only once per subject, so there is no within-subject T repeat difference. A separate T repeat variance requires repeated T administrations or an explicit assumption linking T variability to another estimable component.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. In a model with an intercept, sequence, period, and reference-coded formulation indicator, what does the formulation coefficient represent?
  2. Which formulation-specific within-subject residual variances can a partial replicate with R repeated and T once per subject inform directly?
  3. Why does a within-subject difference between two period-adjusted administrations of the same formulation remove a stable subject-by-formulation effect?
  4. What problem arises if every subject receives R only in early periods and T only in later periods?
  5. For a within-formulation repeat-difference variance of \(0.050\) log-unit squared, calculate the corresponding within-subject residual variance and standard deviation.

Solutions. (1) It is the adjusted test-minus-reference mean contrast on the response scale; for log exposure, exponentiation gives the test-to-reference geometric mean ratio. (2) It can directly inform the R repeat variance, but not a separate T repeat variance without repeated T observations or an additional equality assumption. (3) The stable subject and subject-by-formulation terms are shared by both administrations, so they subtract to zero; the difference retains the occasion errors. (4) Formulation is confounded with period, so their effects cannot be separated from those observations. (5) Since the repeat-difference variance is \(2\sigma_F^2\), the estimated residual variance is \(0.050/2=0.0250\) log-unit squared and the standard deviation is \(\sqrt{0.0250}=0.1581\) log units.