Tutorials › Bioavailability and Bioequivalence › Deriving Sample Size for a Two-Period Crossover

Sample Size and Power · Tutorial 125 of 399

Deriving Sample Size for a Two-Period Crossover

Learn to derive and apply a planning equation for crossover sample size, then check how its approximation performs against the two-sided equivalence confidence-interval criterion.

Advanced 10 min read

What You'll Learn

  • Relate within-subject log-scale variance to the standard error of the crossover treatment estimate.
  • Derive the approximate sample-size equation from the equivalence confidence-interval rule.
  • Use the nearer log-scale equivalence boundary when the expected test-to-reference ratio is not one.
  • Calculate and round a provisional sample size for balanced crossover sequences.
  • Identify when the approximation needs a more exact power calculation.

Why Crossover Sample Size Depends on Within-Subject Variability

In a two-period, two-treatment crossover study, each participant receives both the test treatment and the reference treatment. The treatment comparison therefore uses within-participant information: stable differences between participants do not contribute to the treatment contrast in the same way they would in a parallel-group design. The planning quantity is consequently the within-subject variance on the log scale, not the variance of measurements across all participants.

The goal is not merely to estimate a treatment difference precisely. For average bioequivalence, the confidence interval for the mean log test-to-reference ratio must lie entirely inside the log-transformed equivalence limits. A useful planning equation follows by asking how many completers make that criterion likely to be satisfied. The derivation below gives a transparent normal approximation; it is a starting point for planning, not a replacement for a full power calculation.

Definition: Let \(\theta\) be the expected mean difference between test and reference on the log scale, and let \(\sigma_w^2\) be the within-subject variance of a log-transformed pharmacokinetic measure. Let \(L=\ln(0.80)\) and \(U=\ln(1.25)\) denote the usual log-scale equivalence limits. The sample size \(N\) below is the number of evaluable participants, or completers, in a balanced two-period, two-treatment crossover with \(N/2\) participants assigned to each sequence.

Model and Assumptions

Use the conventional additive model on the log scale: the observed log outcome is represented by an overall mean, a treatment effect, a period effect, a participant effect, and a residual. The model assumes that treatment and period effects are additive, residuals have mean zero and a common within-subject variance, and the randomized sequences are balanced. It also assumes no consequential carryover effect and that the planned analysis and study conduct support a valid crossover comparison. The within-subject residual variance is \(\sigma_w^2\).

For this planning derivation, assume a complete data set and take \(\sigma_w^2\) as known at its planning value. The normal approximation treats the estimated treatment difference as normally distributed with variance \(2\sigma_w^2/N\), and substitutes the normal quantile for the finite-sample \(t\) critical value. In an actual analysis, the variance is estimated and the confidence interval uses a \(t\) critical value with the analysis degrees of freedom. Those distinctions matter particularly when the planned sample is small.

With equal allocation, each sequence contributes equally to the treatment estimate. A participant’s contrast between the two periods contains two residual terms; if the period residuals are independent with variance \(\sigma_w^2\), the contrast variance is \(2\sigma_w^2\). Averaging the sequence-specific contrasts with equal weight gives the variance below. This makes clear why \(N\) means total completers across both sequences, not the number in each sequence.

$$ \operatorname{Var}(\hat{\theta}) \approx \frac{2\sigma_w^2}{N}, \qquad SE(\hat{\theta}) \approx \sqrt{\frac{2\sigma_w^2}{N}}. $$

Deriving the Approximate Equation

For a one-sided test at level \(\alpha\), the corresponding two-sided confidence interval used for equivalence has confidence level \(1-2\alpha\). Its normal-approximation half-width is \(z_{1-\alpha}SE\), where \(z_q\) is the \(q\) quantile of the standard normal distribution. The interval passes the equivalence criterion only if both endpoints fall within \([L,U]\).

Suppose the expected treatment difference is \(\theta\). The distance from that expectation to the nearer equivalence limit is \(d=\min(\theta-L,\ U-\theta)\), which must be positive for the anticipated effect to be inside the equivalence region. Focusing first on the nearer boundary, the probability of clearing that boundary is approximately at least \(1-\beta\) when the distance, in standard-error units, is at least the confidence-interval allowance plus the normal quantile for the target power.

$$ \frac{d}{SE(\hat{\theta})} \geq z_{1-\alpha}+z_{1-\beta}. $$

Substitute \(SE(\hat{\theta})\approx\sqrt{2\sigma_w^2/N}\), square both positive sides, and rearrange for \(N\):

$$ N_{\text{approx}} = \frac{2\sigma_w^2\left(z_{1-\alpha}+z_{1-\beta}\right)^2}{d^2}, \qquad d=\min(\theta-L,\ U-\theta). $$

This is a one-boundary normal approximation. It targets the chosen power against the nearer limit while treating the opposite limit as sufficiently remote. The actual equivalence criterion requires passing both boundaries, so a final design should check the probability of the full confidence-interval event using the planned variance, critical value, and allocation. The approximation is most reliable when the expected ratio is inside the limits and the more distant boundary contributes little to failure probability.

Key interpretation: Increasing \(\sigma_w^2\), increasing the target power, or moving the expected ratio closer to either equivalence limit increases the required sample size. The formula produces a number of completers; sequence balance and any allowance for dropout must be considered separately.

Worked Calculations and Design Checks

Worked Example: Planning with a 3% Expected Ratio Difference

Consider a hypothetical study with within-subject log-scale variance \(\sigma_w^2=0.06062\), expected test-to-reference ratio \(1.03\), one-sided \(\alpha=0.05\), and target power \(1-\beta=0.90\). Thus \(\theta=\ln(1.03)\), \(z_{1-\alpha}=1.645\), and \(z_{1-\beta}=1.282\). The assumptions for the approximation are a balanced crossover, complete observations, and the normal variance model stated above.

The upper-bound distance is \(\ln(1.25)-\ln(1.03)=\ln(1.25/1.03)\approx0.1936\). The lower-bound distance is \(\ln(1.03)-\ln(0.80)=\ln(1.03/0.80)\approx0.2527\). The upper boundary is nearer, so \(d\approx0.1936\).

Substituting the displayed rounded inputs gives:

$$ N_{\text{approx}} = \frac{2(0.06062)(1.645+1.282)^2}{(0.1936)^2} = \frac{1.03870}{0.03748096} \approx 27.71. $$

The result is a provisional estimate of about 28 completers. For equal allocation, the total must be even, so first consider \(N=28\), or 14 participants per sequence. However, the one-boundary approximation is not itself a check that the full equivalence interval will pass with 90% probability. Under the corresponding normal approximation to the full interval criterion, \(N=28\) gives approximately 88.9% power; \(N=30\), with 15 participants per sequence, gives approximately 90.9%. Thus 30 completers is the smallest balanced total among these nearby candidates that meets the 90% target under that check. A final design should use the planned analysis method and its appropriate finite-sample calculation.

Worked Example: Recalculating for an Expected Ratio of 0.98

Keep the variance, \(\alpha\), and power target from the previous hypothetical calculation, but suppose the anticipated test-to-reference ratio is \(0.98\). Then \(\theta=\ln(0.98)\). The model and balanced allocation assumptions are unchanged, so the same normal-approximation equation applies.

The distance to the lower limit is \(\ln(0.98)-\ln(0.80)=\ln(0.98/0.80)\approx0.2029\). The distance to the upper limit is \(\ln(1.25)-\ln(0.98)=\ln(1.25/0.98)\approx0.2433\). The lower limit is nearer, giving \(d\approx0.2029\). Therefore:

$$ N_{\text{approx}} = \frac{2(0.06062)(1.645+1.282)^2}{(0.2029)^2} = \frac{1.03870}{0.04117} \approx 25.23. $$

The provisional estimate rounds up to 26 total completers to preserve equal sequence sizes, or 13 per sequence. The required sample is lower than for the expected ratio of 1.03 because its nearest-boundary distance is larger: about 0.2029 rather than 0.1936 log units. As before, 26 is a planning approximation and should be checked against the full two-boundary criterion before it is adopted.

Worked Example: Increasing the Planned Variance

Return to the 1.03 expected ratio and the original equivalence and power settings, but plan for a within-subject variance 30% larger. The revised variance is \(1.30(0.06062)=0.078806\). The closer boundary and its distance remain \(d\approx0.1936\), so only the variance term in the approximate equation changes.

$$ N_{\text{approx}} = \frac{2(0.078806)(1.645+1.282)^2}{(0.1936)^2} = \frac{1.35031}{0.03748096} \approx36.03. $$

Rounding up gives at least 37 completers before balancing; the smallest even total at or above that value is 38, or 19 per sequence. This agrees with the proportional relationship in the equation: when all other inputs remain fixed, multiplying \(\sigma_w^2\) by 1.30 multiplies the unrounded sample-size estimate by 1.30. This example does not account for dropout or nonevaluable profiles.

Implementation, Diagnostics, and Limitations

1
Set the design quantities.
Specify the equivalence limits, one-sided \(\alpha\), target power, expected log ratio \(\theta\), and planned within-subject variance \(\sigma_w^2\).
2
Find the limiting margin.
Calculate \(\theta-L\) and \(U-\theta\). If either is nonpositive, the assumed expected ratio is not strictly inside the equivalence region. Otherwise take the smaller positive distance as \(d\).
3
Calculate and balance completers.
Apply the approximation, round upward, and select a total divisible equally between the two sequences. Then check the full two-boundary confidence-interval power under the planned analysis.

The calculation can be misleading if the variance is on the wrong scale, if the expected ratio is entered as a ratio rather than its logarithm, or if \(N\) is mistaken for the number in each sequence. Check units and definitions before substitution: log outcomes and their standard errors are on the log scale, and \(N\) counts both sequences together. Also check that the anticipated mean is inside the equivalence limits; a zero or negative \(d\) makes the stated planning equation inapplicable.

The formula is an approximation because the analysis estimates variance, uses finite degrees of freedom, and requires both confidence-interval limits to pass. It also presumes balanced allocation and complete data. Unequal sequence sizes, substantial dropout, uncertainty in the variance estimate, or a treatment expectation near a boundary can change power. The main alternative is to calculate power directly under the planned test or confidence-interval procedure, accounting for both boundaries and the finite-sample distribution; this is especially important when the approximation is near the target or the proposed sample is small. The approximation is useful as a transparent initial calculation and as a check on the scale of a more detailed design calculation.

A Common Planning Mistake

A common error is to calculate \(N_{\text{approx}}\), round it to an integer, and report that as a guaranteed sample size for the target equivalence power. The equation arises from the nearer one-sided boundary under a normal approximation; it does not by itself establish the probability of passing both boundaries with an estimated variance and a \(t\)-based interval. In the first worked example, the preliminary value is about 27.71, but the balanced \(N=28\) full normal-criterion check is about 88.9%, below 90%. The correction is to preserve the approximation’s role, balance the total, and verify the full criterion using the planned analysis.

A second version of the same mistake is to use the larger of the two boundary distances. That would plan to the less restrictive side and could understate the sample size. Use the smaller distance, \(\min(\theta-L,U-\theta)\), because the nearer boundary is the more demanding one.

Check Your Understanding

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

  1. In the sample-size equation, does \(N\) denote the total number of completers or the number assigned to each sequence?
  2. Suppose \(\theta\) is closer to the lower equivalence limit than the upper limit. Which distance determines \(d\), and why?
  3. For fixed expected ratio, margins, and power, what happens to the approximate sample size if the planned within-subject variance doubles?
  4. Why is it not always sufficient to report the result of the one-boundary approximation as the final sample size for an equivalence study?

Solutions. (1) \(N\) is the total number of completers across both sequences; a balanced design allocates \(N/2\) to each. (2) Use \(\theta-L\), the smaller distance, because the nearer boundary is more restrictive for the confidence interval. (3) The equation is proportional to \(\sigma_w^2\), so doubling the variance doubles the unrounded approximate sample size; the balanced total must then be rounded up as needed. (4) The approximation focuses on the nearer boundary and uses a normal distribution with a planning variance. Equivalence requires both confidence-interval limits to pass, and the actual analysis typically estimates variance and uses a finite-sample \(t\) critical value. A full criterion check may therefore require more participants.