Why the Model Must Reflect the Crossover
A replicate crossover study measures each participant under more than one treatment and repeats at least one treatment within a participant. The resulting observations are not independent: measurements from the same participant can share a subject-specific baseline, and the period in which a treatment is given can matter. A mixed-effects model represents these features explicitly while estimating the treatment contrast needed for a bioequivalence analysis.
The focus here is the model specification: which terms describe the design, which term represents subject-to-subject variation, and what assumptions make the model interpretable. For illustration, assume a four-period, two-sequence design, with sequences TRTR and RTRT. Both test (T) and reference (R) are administered twice to each participant. The same framework applies to other replicate schedules, provided the model terms match the actual design.
Model Terms and Their Roles
A useful starting model is
Here, \(\mu\) is an overall mean; \(S_i\) is the fixed effect of sequence \(i\); \(P_k\) is the fixed effect of period \(k\); and \(\tau_{d_{ik}}\) is the fixed treatment effect for the treatment given in that period. The term \(b_{j(i)}\) is the random effect for subject \(j\) nested in sequence \(i\). The residual \(\varepsilon_{ijk}\) is the within-subject deviation not explained by those terms.
Sequence, period, and treatment are fixed effects because they are design factors whose specific levels are of interest in this study. Subjects are typically modeled as random effects: the enrolled subjects are viewed as a sample from a broader population of potential participants, and the model represents their differing baseline levels. Nesting matters because each participant follows one assigned sequence; a subject number such as “subject 3” identifies a participant within that sequence, not a participant shared across sequences.
One common distributional specification is \(b_{j(i)}\sim N(0,\sigma_b^2)\), with independent subject effects across participants. Conditional on the subject effects and fixed terms, residuals are assumed to have mean zero, to be independent across subjects, and to follow a prespecified within-subject covariance structure. A simple version uses independent normal residuals with one common variance. If the protocol or analysis plan calls for different residual variances by treatment, that structure must be specified explicitly; it is not implied merely by calling the analysis a mixed-effects model.
The model also assumes that the specified fixed-effect structure is adequate. In the basic additive model, treatment effects do not change by period or sequence, and there is no unmodeled carryover effect that distorts the current-period response. Appropriate washout and study conduct are therefore substantive assumptions, not just software settings. The endpoint and its transformation must also be suitable: for the usual bioequivalence interpretation, the response is commonly the natural logarithm of a positive PK endpoint.
Identifying the Treatment Contrast
Use a reference-coded treatment effect by setting \(\tau_R=0\) and \(\tau_T=\delta\). Then \(\delta\) is the model-based test-minus-reference difference on the log scale. Its exponentiation is a ratio of geometric means on the original scale:
The treatment contrast is a fixed-effect contrast, not a comparison of two unrelated groups. Subject effects account for the shared baseline of repeated observations, while period and sequence terms account for design features that might otherwise be mixed into the treatment estimate. The estimate and its standard error depend on the design, covariance specification, and estimation method. The model by itself does not determine the acceptance limits or replace the applicable bioequivalence decision rule.
Worked Example: Assigning Terms in a Four-Period Design
Suppose a hypothetical study assigns 24 participants equally to sequences TRTR and RTRT. Each participant completes four periods, and the endpoint is log AUC. Write the model terms for the observation from subject 7 in sequence TRTR during period 3.
In this sequence, period 3 receives T. The observation is therefore \(Y_{1,7,3}\), where \(i=1\) denotes TRTR, \(j=7\) identifies the subject within that sequence, and \(k=3\) denotes period 3. Its model expression is
The fixed terms are the overall mean, the TRTR sequence effect, the period-3 effect, and the test treatment effect. The subject-specific random term is \(b_{7(1)}\), not a separate fixed treatment effect. Since the outcome is log AUC, all terms in this expression are on the log-AUC scale.
The design supplies observations for both treatments in each sequence and periods, so the treatment contrast can be estimated separately from the fixed period and sequence effects under the stated model. The assignment alone does not prove that the assumptions hold; washout, data completeness, and model diagnostics still need review.
A Small Numerical Illustration of the Contrast
In a complete, balanced design with equal residual variances, a treatment contrast can be illustrated by the marginal means of the log responses. In a real analysis, the mixed model estimates the contrast using all observations and the specified covariance structure; the simple calculation below illustrates its scale and interpretation.
Worked Example: From Log-Scale Difference to Geometric Mean Ratio
Consider hypothetical, balanced data from eight participants, four per sequence. Suppose the model-adjusted mean log-AUC is 4.665 for T and 4.6275 for R. The estimated treatment contrast is
Exponentiating gives
Thus the estimated geometric mean AUC for T is 1.0382 times that for R, or about 103.8% of the reference geometric mean. This is an estimate, not a conclusion that bioequivalence has been established. A decision requires the applicable confidence interval and acceptance rule, with the required uncertainty calculation from the fitted model.
Why Repeated Measurements Need a Subject Effect
A short variance calculation shows why within-subject dependence matters. For a simplified subject-intercept model, write one log response under each treatment as \(Y_T=\mu_T+b+\varepsilon_T\) and \(Y_R=\mu_R+b+\varepsilon_R\). If the subject effect \(b\) has variance \(\sigma_b^2\), and residuals have variance \(\sigma_e^2\) and are independent conditional on \(b\), then the covariance between the two responses is \(\sigma_b^2\). Subtracting the responses cancels the shared subject effect:
If those observations were incorrectly treated as independent, their marginal variances would each be \(\sigma_b^2+\sigma_e^2\), and the variance of their difference would be calculated as \(2(\sigma_b^2+\sigma_e^2)\). That calculation fails to account for the positive covariance from the shared subject effect. Replicate designs have more observations per subject, so the appropriate covariance structure must reflect the actual repeated-treatment schedule, rather than treating every period as a new independent participant.
Worked Example: Quantifying the Effect of Ignoring Dependence
For a hypothetical simplified paired comparison, suppose \(\sigma_b^2=0.040\), \(\sigma_e^2=0.010\), and \(n=12\) participants each have one log response under T and one under R. Under the subject-intercept model, the variance of a participant’s T-minus-R difference is
The standard error of the mean paired difference is therefore
The marginal variance of either response is \(0.040+0.010=0.050\). If the two treatment groups were incorrectly treated as independent, the corresponding standard error would be
These calculations use a simplified paired setup to isolate the dependence issue; they are not a substitute for fitting the replicate crossover model. They show that an independent-observations calculation discards the within-subject covariance and can misstate uncertainty.
Estimation, Diagnostics, and Alternatives
Mixed-effects models are commonly fitted by maximum likelihood or restricted maximum likelihood (REML). Fixed-effect estimates provide the treatment contrast; inference also requires a standard error and degrees-of-freedom approach appropriate to the fitted model and analysis plan. Software output should be checked against the design: verify the treatment sequence in every period, the subject-within-sequence identifiers, the reference coding, the covariance specification, and the contrast direction before interpreting estimates.
Useful diagnostics include checking residual patterns against fitted values and period, reviewing the distribution of subject-level effects where relevant, and confirming that the model converged without warnings. Examine whether treatment and period combinations are represented as expected and whether missing observations have left a design cell unsupported. A singular fit, an implausible variance estimate, large residual patterns by period, or convergence warnings can indicate that the covariance structure is too complex, data are insufficient for it, or the model does not match the study.
A paired analysis can be a reasonable simplification for a simple two-treatment, two-period crossover when its assumptions and design are appropriate. It does not directly represent a multi-period replicate schedule with period and sequence effects. A fixed-subject model can also represent participant differences, but it treats the observed participants as fixed levels and may consume many parameters; the random subject-within-sequence term is the usual population-oriented representation. Neither alternative excuses checking the design or covariance assumptions.
The basic random-intercept model has limitations. It may be inadequate when within-subject correlation is not captured by a shared intercept, when residual variability differs in a way the model omits, or when period-related patterns remain. Adding terms indiscriminately is not a solution: model complexity must be supported by the design and prespecified analysis. In particular, a treatment contrast estimated from an incorrectly coded or poorly supported model can be precise-looking but misleading.
Check Your Understanding
Answer each question, then compare with the solutions below.
- In the model, which effects are fixed and which effect represents participant-to-participant baseline variation?
- For sequence RTRT, what treatment is received in period 4, and which treatment term appears in that observation’s model equation?
- If the estimated log-scale treatment contrast is \(-0.0200\), what is the estimated test-to-reference geometric mean ratio?
- Why is it generally inappropriate to analyze all periods as independent observations?
Solutions. (1) Sequence, period, and treatment are fixed effects; subject nested within sequence is a random effect. (2) RTRT receives T in period 4, so the equation contains \(\tau_T\). (3) \(\exp(-0.0200)=0.9802\), so the estimated T geometric mean is 98.02% of the R geometric mean. (4) Observations from the same participant share subject-level variation and are correlated; an independent analysis ignores that covariance and can give an incorrect standard error.