Tutorials › Biostatistics › Sample Size for Repeated Measures Designs

Sample Size & Longitudinal Designs

Sample Size for Repeated Measures Designs

How repeated observations from the same participant change sample size requirements: a computational guide to within-subject correlation, repeated measures ANOVA, longitudinal treatment effects, attrition, nonsphericity, and mixed-model planning.

Intermediate 10 min read

What You'll Learn

  • Why repeated measures can require fewer participants than independent observations
  • How within-subject correlation affects statistical power
  • How to calculate sample size for a two-timepoint repeated measures comparison
  • How repeated measures ANOVA uses effect size, number of visits, and nonsphericity
  • Why more visits do not automatically produce proportionally more power
  • How to inflate sample size for dropout and incomplete follow-up

Introduction

Many clinical trials measure the same participant repeatedly over time. A patient may have a baseline assessment followed by measurements at Week 2, Week 4, Week 8, and Week 12. These observations are not independent because they come from the same individual.

That dependence is the defining feature of a repeated measures design. It is also the feature that makes sample size planning different from the ordinary two-sample or one-sample calculations used when each participant contributes only one observation.

The important statistical concept is within-subject correlation. If measurements from the same participant are strongly correlated, the repeated observations contain substantial information about one another. This can improve precision when the analysis appropriately accounts for the correlation.

Clinical intuition: If a patient's biomarker is unusually high at baseline, that patient's subsequent measurements are likely to be somewhat higher as well. Knowing the patient's baseline therefore provides information about the patient's later measurements. Repeated measures methods exploit that within-patient structure rather than treating every observation as if it came from a different person.

What Makes a Repeated Measures Design Different?

Suppose a trial has two treatment groups and measures the primary endpoint at baseline and Week 12. There are two fundamentally different ways to think about the data.

An independent-groups analysis would treat the Week 12 observations as if each participant contributed one independent outcome. A repeated-measures analysis instead recognizes that baseline and Week 12 measurements within the same participant are correlated.

The correlation can be represented as:

$$ \rho=\operatorname{Corr}(Y_{i0},Y_{i1}) $$

where \(Y_{i0}\) and \(Y_{i1}\) are two measurements from participant \(i\).

The value of \(\rho\) can have a substantial impact on the variance of a within-subject change.

The Two-Timepoint Case: Change From Baseline

The simplest repeated measures design contains two measurements: baseline and one follow-up. For each participant, define the change score:

$$ \Delta_i=Y_{i1}-Y_{i0} $$

The variance of the change score is:

$$ \operatorname{Var}(\Delta) = \sigma_1^2+\sigma_0^2-2\rho\sigma_1\sigma_0 $$

If the standard deviation is approximately the same at both timepoints, \(\sigma_0=\sigma_1=\sigma\), this simplifies to:

$$ \operatorname{Var}(\Delta) = 2\sigma^2(1-\rho) $$

and therefore:

$$ SD(\Delta) = \sigma\sqrt{2(1-\rho)} $$

This equation explains one of the most important facts about repeated measures designs: higher within-subject correlation reduces the variability of change scores.

Why Correlation Can Reduce Sample Size

Consider a hypothetical endpoint with a standard deviation of 10 units at both baseline and follow-up. Compare three possible within-subject correlations.

Correlation SD of change
0.00 14.14
0.30 11.83
0.60 8.94
0.80 6.32

When the correlation is zero, the change score is relatively noisy. When the correlation is 0.80, much of the subject-specific variability cancels when the baseline measurement is subtracted from the follow-up measurement.

This is one reason baseline adjustment and repeated-measures analyses can be considerably more efficient than analyses that ignore the longitudinal structure.

Important: The benefit of repeated measurements is not simply "more observations." The same participant contributes multiple correlated observations. The amount of information gained depends on the covariance structure, the treatment effect, the timing of measurements, and the analysis model.

A Complete Two-Group Worked Example

Consider a randomized parallel-group clinical trial with two treatment groups. The primary endpoint is measured at baseline and Week 12. The primary analysis will compare the mean change from baseline between treatment groups.

Suppose the design assumptions are:

Parameter Assumption
Two-sided significance levelα = 0.05
Power90%
Standard deviation at each visit10 units
Baseline/follow-up correlationρ = 0.60
Difference in mean change between groups4 units
Allocation1:1
Expected dropout10%

The first step is to determine the standard deviation of the change score.

$$ SD(\Delta) = 10\sqrt{2(1-0.60)} $$
$$ SD(\Delta) = 10\sqrt{0.80} \approx 8.944 $$

The standardized difference in mean change is therefore:

$$ d= \frac{4}{8.944} \approx0.447 $$

For a two-group comparison with equal allocation, an approximate sample size per group is:

$$ n = \frac{ 2(z_{1-\alpha/2}+z_{1-\beta})^2\sigma_\Delta^2 }{ \delta^2 } $$

For 90% power:

$$ z_{1-\alpha/2}=1.96 \qquad z_{1-\beta}=1.282 $$

Substituting the assumptions:

$$ n = \frac{ 2(1.96+1.282)^2(8.944^2) }{ 4^2 } $$

This gives approximately:

$$ n\approx105.1 $$

Because enrollment must be an integer, the trial requires approximately 106 evaluable participants per treatment group, or 212 evaluable participants total.

Inflating for Dropout

The previous calculation describes the number of participants required with complete primary endpoint data. If 10% of participants are expected to provide no usable Week 12 assessment, the enrollment target must be increased.

The standard inflation is:

$$ N_{\text{enroll}} = \frac{N_{\text{evaluable}}}{1-r} $$

where \(r\) is the anticipated dropout proportion.

For this example:

$$ N_{\text{enroll}} = \frac{212}{1-0.10} = 235.6 $$

Thus, a practical target would be approximately:

$$ \boxed{236\text{ participants}} $$

With equal allocation, this corresponds to approximately 118 participants per treatment group.

Do not confuse evaluable sample size with enrollment sample size. If the calculation requires 212 participants with primary endpoint data and 10% dropout is expected, you do not enroll 212 and hope that 10% remain usable. You inflate the enrollment target to approximately 236.

How Much Does Correlation Matter?

Using the same assumptions, except changing the within-subject correlation, illustrates how strongly the correlation can affect the required sample size.

ρ SD of change Approx. evaluable N/group
0.00 14.14 264
0.30 11.83 185
0.60 8.94 106
0.80 6.32 53

The relationship is striking. Under these assumptions, increasing the correlation from 0.00 to 0.60 reduces the required sample size per group from approximately 264 to 106.

This occurs because the variance of change is proportional to:

$$ 1-\rho $$

However, this does not mean that investigators should simply assume a very high correlation to obtain a smaller sample size. The correlation should be supported by prior clinical data, pilot data, historical studies, or a conservative sensitivity analysis.

What If There Are More Than Two Visits?

Most longitudinal clinical trials have more than two measurements. For example:

Visit Timing
BaselineWeek 0
Visit 2Week 2
Visit 3Week 4
Visit 4Week 8
Visit 5Week 12

Now the analysis is no longer simply a comparison of two change scores. The investigator may be interested in the entire trajectory over time.

A common framework is a repeated measures ANOVA, while modern clinical trials frequently use a mixed-effects model for repeated measures (MMRM).

The sample size calculation therefore depends on more than just a standard deviation and a treatment difference. It may also depend on:

  • The number of repeated measurements
  • The expected correlation between measurements
  • The covariance structure
  • The treatment-by-time interaction
  • The effect size definition
  • The assumed nonsphericity
  • The planned analysis model
  • The amount and pattern of missing data

Repeated Measures ANOVA and Effect Size \(f\)

For a traditional repeated measures ANOVA, the treatment or time effect is often expressed using Cohen's \(f\). For a one-factor repeated measures setting, the effect size can be thought of as describing the magnitude of systematic differences relative to residual variability.

The general relationship is:

$$ f = \frac{\sigma_{\text{effect}}}{\sigma_{\text{error}}} $$

The exact definition of \(f\) depends on the repeated-measures hypothesis and software convention. Therefore, an investigator should not simply take an arbitrary standardized mean difference and label it a repeated-measures \(f\).

Sample size warning: Repeated-measures effect sizes are not interchangeable with ordinary two-sample Cohen's d. Before entering an effect size into a repeated-measures calculator, verify exactly how the software defines \(f\), the numerator degrees of freedom, and the covariance assumptions.

A Worked Repeated Measures ANOVA Example

Consider a single-factor repeated-measures design with four scheduled measurements. Suppose the investigator wants to detect a moderate within-subject effect. For illustration, assume:

Parameter Assumption
Number of measurements4
Effect sizef = 0.25
Two-sided α0.05
Power80%
Nonsphericity correctionε = 1.00

Using a standard noncentral-F formulation for a four-measurement repeated-measures effect, the numerator degrees of freedom are:

$$ df_1=(m-1)\epsilon $$

where \(m=4\). Thus:

$$ df_1=3 $$

The denominator degrees of freedom are approximately:

$$ df_2=(N-1)(m-1)\epsilon $$

The noncentrality parameter is determined by the effect size, total sample size, number of measurements, and the convention used for the nonsphericity adjustment. Solving the corresponding noncentral-F power equation gives an approximate requirement of 45 evaluable participants for this illustrative specification.

Why this number should not be copied into a protocol: Repeated-measures sample size calculations are highly dependent on the exact hypothesis and covariance assumptions. The value of 45 is a teaching example, not a universal requirement for a four-visit study with f = 0.25.

Effect Size Has a Major Influence on Sample Size

The relationship between effect size and sample size is nonlinear. Smaller effects require substantially more participants.

For the same illustrative four-measurement repeated-measures design, approximate sample sizes under the stated noncentral-F formulation are:

Effect size f Approx. N at 80% power
0.20 70
0.25 45
0.30 32

The difference between \(f=0.20\) and \(f=0.30\) may appear modest numerically, but it changes the sample size substantially.

This is why the assumed treatment effect is usually one of the most important and difficult inputs in a clinical trial sample size calculation.

Sphericity and the Nonsphericity Correction

Traditional repeated measures ANOVA makes a covariance assumption called sphericity. Informally, sphericity concerns whether the variances of pairwise differences between repeated measurements are sufficiently similar.

When sphericity does not hold, the nominal degrees of freedom may be too large, which can make the test anticonservative.

A common solution is to reduce the degrees of freedom using a nonsphericity correction:

$$ df_1=(m-1)\epsilon $$

where:

  • \(m\) is the number of repeated measurements, and
  • \(\epsilon\) is the nonsphericity correction, generally between its lower bound and 1.

An \(\epsilon\) of 1 represents perfect sphericity. Smaller values imply greater departure from the assumption.

Sensitivity to Nonsphericity

Using the same illustrative four-measurement design, suppose the assumed effect size is \(f=0.25\). A more conservative nonsphericity assumption increases the approximate sample size.

ε Approx. N at 80% power
1.00 45
0.75 55
0.50 73

The practical lesson is important: sample size should be evaluated under plausible covariance assumptions rather than a single optimistic scenario.

More Measurements Do Not Automatically Mean Proportionally More Power

It is tempting to believe that adding visits always dramatically reduces sample size. That is not generally true.

The additional measurements are correlated with the measurements already collected. If two visits contain almost identical information, the second measurement contributes less independent information than a completely new participant would.

The marginal value of another visit therefore depends on:

  • How strongly it correlates with other visits
  • How close it is in time to the other visits
  • Whether treatment effects are expected to differ at that visit
  • The amount of measurement error
  • The covariance structure
  • The missing-data pattern
Design principle: The goal is not to maximize the number of visits. The goal is to collect measurements at timepoints that provide meaningful information about the treatment effect and its trajectory.

Correlation Structures in Longitudinal Trials

With three or more visits, there is no longer one single correlation. A participant can have a correlation between baseline and Week 2, another between Week 2 and Week 4, and another between Week 2 and Week 12.

Several covariance structures are commonly considered.

Structure Basic idea
Compound symmetry All repeated measurements have the same variance and common correlation
AR(1) Measurements closer in time are more highly correlated
Unstructured Variances and covariances are estimated separately
Toeplitz Correlation depends on the lag between measurements

For example, an AR(1) covariance structure assumes:

$$ \operatorname{Corr}(Y_{ij},Y_{ik}) = \rho^{|j-k|} $$

Thus, if \(\rho=0.70\), adjacent visits have correlation 0.70, visits two timepoints apart have correlation \(0.70^2=0.49\), and so forth.

The covariance assumption can materially affect the calculated sample size.

Repeated Measures vs. Repeated Measures With a Treatment Group

There is an important distinction between testing whether measurements change over time and testing whether treatment groups change differently over time.

In a randomized clinical trial, the latter is often the scientifically important question.

For example:

$$ H_0: (\mu_{T,12}-\mu_{T,0}) = (\mu_{C,12}-\mu_{C,0}) $$

versus:

$$ H_A: (\mu_{T,12}-\mu_{T,0}) \ne (\mu_{C,12}-\mu_{C,0}) $$

This is a treatment-by-time interaction. It asks whether the longitudinal trajectory differs between treatment groups.

Clinical interpretation: A significant time effect alone does not establish treatment efficacy. Both treatment groups can improve over time because of natural history, placebo effects, regression to the mean, or background therapy. The treatment-by-time comparison is often closer to the actual randomized treatment question.

Baseline Is Not Just Another Follow-Up Visit

Baseline measurements require special consideration. In many clinical trials, the primary analysis uses baseline as a covariate rather than treating baseline as one of several exchangeable repeated outcomes.

For example, an ANCOVA model may compare Week 12 outcomes while adjusting for baseline:

$$ Y_{i,12} = \beta_0+\beta_1T_i+\beta_2Y_{i,0}+\varepsilon_i $$

Alternatively, an MMRM may include baseline as a covariate while modeling post-baseline measurements jointly.

These approaches can have different efficiency properties and therefore different sample size requirements.

This is why the statement "there are five repeated measurements" is not sufficient to determine a sample size. The analyst must know which measurements are included in the primary hypothesis and how the model will use baseline.

MMRM Sample Size Planning

Mixed-effects models for repeated measures are widely used in longitudinal clinical trials. A simplified model might be written:

$$ Y_{ij} = \beta_0 + \beta_1T_i + \beta_2Visit_j + \beta_3(T_i\times Visit_j) + b_i + \varepsilon_{ij} $$

where:

  • \(T_i\) identifies treatment group,
  • \(Visit_j\) identifies time,
  • \(T_i\times Visit_j\) represents treatment-by-visit interaction,
  • \(b_i\) represents subject-specific random variation, and
  • \(\varepsilon_{ij}\) represents residual error.

The exact model can be considerably more complicated in a real clinical trial. Covariates, baseline values, stratification factors, treatment-by-baseline interactions, unequal visit spacing, and different covariance structures may all be included.

Consequently, MMRM sample size calculations are often performed using specialized statistical software or simulation rather than a single closed-form equation.

Simulation-Based Sample Size Planning

Simulation is particularly useful when the planned analysis is complicated. Instead of relying on a simple mathematical approximation, the investigator can simulate individual patient trajectories under the assumed treatment effect and covariance structure.

A typical simulation workflow is:

  1. Specify the number of treatment groups and planned enrollment.
  2. Specify the expected mean response at each visit.
  3. Specify the residual variance and covariance structure.
  4. Generate repeated observations for each simulated participant.
  5. Apply the planned analysis model.
  6. Record whether the prespecified hypothesis test rejects the null hypothesis.
  7. Repeat the process thousands of times.
  8. Estimate power as the proportion of simulated trials that are statistically significant.

If 8,000 of 10,000 simulated trials achieve statistical significance, the estimated power is:

$$ \widehat{\text{Power}} = \frac{8000}{10000} = 0.80 $$

Simulation becomes particularly attractive when there are complicated missing-data patterns, unequal visit spacing, nonstandard covariance structures, multiple endpoints, or nonlinear trajectories.

Missing Data Is More Complicated Than Simple Dropout

The simple dropout inflation formula assumes that a participant either contributes the primary endpoint or does not. Longitudinal trials are often more complicated.

A participant might provide:

  • Baseline
  • Week 2
  • Week 4
  • No Week 8 measurement
  • Week 12 measurement

Under an MMRM, that participant may still contribute substantial information. Therefore, inflating sample size by the full percentage of participants who miss any single visit may be unnecessarily conservative.

The appropriate approach depends on the planned analysis and the missing-data assumptions.

Key distinction: "10% dropout" does not necessarily mean "10% of all longitudinal observations disappear." A patient who misses one intermediate visit but returns later is different from a patient who permanently withdraws from the study.

Attrition Sensitivity Analysis

Even when the primary assumption is 10% attrition, it is useful to examine alternative scenarios.

Expected attrition Enrollment multiplier
5% 1 / 0.95 = 1.053
10% 1 / 0.90 = 1.111
15% 1 / 0.85 = 1.176
20% 1 / 0.80 = 1.250

For example, if 212 evaluable participants are required:

Attrition Approx. enrollment
5%224
10%236
15%250
20%265

This sensitivity analysis can be more informative than presenting a single enrollment target without showing how dependent it is on the dropout assumption.

What Happens if the Correlation Is Misspecified?

Correlation is rarely known exactly before a trial begins. It is estimated from prior studies, pilot data, or literature and therefore contains uncertainty.

Suppose the true correlation is lower than anticipated. The variance of change will be larger than expected:

$$ \sigma_\Delta^2 = 2\sigma^2(1-\rho) $$

If the design assumed \(\rho=0.60\) but the actual correlation is only 0.30, the trial has less statistical efficiency than expected.

This is one reason sample size planning should include sensitivity analyses across plausible values of the correlation rather than relying on one optimistic estimate.

A Practical Sensitivity Analysis

For the two-timepoint example above, consider the effect of changing both correlation and dropout. The resulting enrollment requirements can be substantial.

Correlation 5% dropout 10% dropout 15% dropout
0.30 390 412 435
0.60 224 236 250
0.80 112 118 125

The table demonstrates why sample size calculations should be treated as design sensitivity analyses, not merely arithmetic exercises.

Repeated Measures and Statistical Efficiency

The efficiency of repeated measures designs can be understood through the idea of within-subject versus between-subject variation.

Suppose patients differ substantially from one another at baseline. Some may naturally have high biomarker values while others have low values. If each patient serves as his or her own reference over time, much of this between-patient heterogeneity can be removed.

This is analogous to blocking in experimental design: the repeated measurement structure creates a natural form of within-subject control.

The advantage is greatest when:

  • Within-subject correlation is reasonably high
  • Between-subject variability is substantial
  • The treatment effect is reflected in longitudinal change
  • Measurements are reliable
  • The covariance structure is modeled appropriately

When Repeated Measures May Not Help as Much

Repeated observations are not automatically efficient. If measurements are extremely noisy or almost independent within a participant, the gain from repeatedly measuring the same individual may be modest.

Likewise, adding many measurements very close together may provide little additional information if those observations are almost identical.

A well-designed longitudinal trial therefore considers not just how many visits will occur but when those visits should occur.

Choosing the Primary Hypothesis Before Calculating Sample Size

The sample size calculation should follow the primary hypothesis, not the other way around.

Possible primary hypotheses include:

  • Difference in change from baseline at a specific visit
  • Difference between treatment groups at a specific follow-up visit
  • Treatment-by-time interaction
  • Overall longitudinal treatment effect
  • Area under the response-time curve
  • Difference in trajectory or slope

Each hypothesis can imply a different variance, effect size, degrees of freedom, and therefore a different sample size.

Protocol principle: Do not calculate sample size using one analysis and then make a substantially different analysis the primary method in the SAP without reassessing the operating characteristics of the design.

Repeated Measures Sample Size in R

For a simple two-timepoint change-score calculation, the underlying arithmetic can be implemented directly in R:

alpha <- 0.05
power <- 0.90

sigma <- 10
rho <- 0.60
delta <- 4

sigma.change <- sigma * sqrt(2 * (1 - rho))

z.alpha <- qnorm(1 - alpha / 2)
z.beta  <- qnorm(power)

n.per.group <-
  2 * (z.alpha + z.beta)^2 *
  sigma.change^2 / delta^2

ceiling(n.per.group)

For the worked example, this returns approximately 106 participants per group before accounting for dropout.

The corresponding enrollment target can be calculated as:

dropout <- 0.10

n.enroll.per.group <-
  ceiling(ceiling(n.per.group) / (1 - dropout))

n.enroll.per.group

which gives approximately 118 participants per group.

Repeated Measures ANOVA in R

For a conventional repeated-measures ANOVA, specialized power calculations can be performed using packages such as pwr or other statistical power software, depending on the exact hypothesis. For example, a noncentral-F calculation can be expressed conceptually as:

# Conceptual repeated-measures power calculation

m <- 4
f <- 0.25
alpha <- 0.05
target.power <- 0.80
epsilon <- 1.00

# The exact implementation depends on the
# definition of f and the planned hypothesis.

For real trial planning, the analyst should use software that explicitly matches the planned repeated-measures hypothesis, covariance assumptions, and definition of effect size.

Simulation of an MMRM Design

For a complicated longitudinal trial, simulation is often preferable. A simplified simulation might generate multivariate normal outcomes for each patient:

library(MASS)

Sigma <- matrix(
  c(
    100, 60, 40, 30,
     60,100, 60, 40,
     40, 60,100, 60,
     30, 40, 60,100
  ),
  nrow = 4,
  byrow = TRUE
)

mu <- c(10, 12, 15, 18)

Y <- mvrnorm(
  n = 100,
  mu = mu,
  Sigma = Sigma
)

A complete trial simulation would then randomize treatment, impose the expected treatment effect, generate missing data under prespecified assumptions, fit the planned MMRM, and repeat the entire trial many times.

The estimated power is the proportion of simulated trials in which the prespecified primary hypothesis is statistically significant.

Sample Size for Repeated Measures vs. Parallel-Group Designs

Feature Independent parallel groups Repeated measures
Observations per participant Usually one primary observation Multiple observations
Within-subject correlation Not applicable Important
Baseline adjustment Can improve precision Often highly relevant
Covariance assumptions Usually simpler Potentially complex
Missing-data structure Usually simpler Often more complicated
Common analysis t-test / ANCOVA MMRM / repeated measures ANOVA
Sample size inputs Effect, SD, alpha, power Effect, SD, correlation/covariance, visits, alpha, power

Common Sample Size Mistakes

1. Treating repeated observations as independent

If a study has 100 participants measured four times, it does not have 400 independent participants. The effective information depends on the within-subject covariance.

2. Assuming correlation without justification

A high correlation can dramatically reduce the calculated sample size. That makes it especially important to justify the assumed value.

3. Confusing Cohen's d and Cohen's f

A standardized difference between two means is not automatically the same as a repeated-measures ANOVA effect size. The effect size must correspond to the exact statistical hypothesis.

4. Ignoring dropout

A calculation that requires 200 complete participants does not imply that 200 participants should be randomized if meaningful attrition is expected.

5. Assuming every missed visit means complete dropout

In an MMRM, participants with some missing observations can often still contribute information. The missing-data assumptions should therefore match the planned analysis.

6. Adding visits without considering information content

Ten highly correlated measurements do not necessarily provide ten times the information of one measurement. Visit timing should have a scientific rationale.

7. Powering the wrong hypothesis

A trial powered to detect a Week 12 treatment difference is not necessarily adequately powered to detect a treatment-by-time interaction across five visits.

8. Rounding down

If a calculation gives 105.1 participants per group, enrolling 105 is not appropriate. Sample size should be rounded upward before any dropout inflation.

A Practical Workflow for Clinical Trial Sample Size Planning

A robust repeated-measures sample size calculation can follow this sequence:

  1. Define the primary estimand and primary hypothesis.
  2. Specify the treatment effect that should be detectable.
  3. Specify the measurement schedule.
  4. Specify the expected variance at each visit.
  5. Specify the within-subject covariance or correlation structure.
  6. Define the planned analysis model.
  7. Choose alpha and target power.
  8. Calculate the required evaluable sample size.
  9. Assess sensitivity to effect size, covariance, and missing data.
  10. Inflate enrollment appropriately for expected attrition.
  11. Round the final target upward and confirm treatment allocation.

What Should Be Documented in a Protocol or SAP?

A reproducible sample size section should state enough information for another statistician to understand how the enrollment target was obtained.

At minimum, document:

  • The primary endpoint
  • The primary timepoint or longitudinal hypothesis
  • The treatment effect assumed
  • The variance or standard deviation assumed
  • The assumed within-subject correlation or covariance structure
  • The number and timing of repeated measurements
  • The statistical test or model
  • The significance level
  • The target power
  • The expected dropout or missing-data assumption
  • The resulting evaluable sample size
  • The final enrollment target

For simulation-based calculations, the simulation algorithm, number of simulated trials, random-number seed strategy, missing-data assumptions, and analysis model should also be documented.

The Difference Between Precision and Power

Repeated measures designs can also be planned around precision rather than hypothesis-testing power. For example, the investigator may want the 95% confidence interval for a treatment effect to have a specified maximum width.

This is particularly attractive when the objective is estimation rather than simply rejecting a null hypothesis.

The conceptual distinction is:

$$ \text{Power} = P(\text{reject }H_0\mid\text{specified alternative}) $$

whereas precision concerns the expected uncertainty around the estimated treatment effect.

A trial can therefore be designed to answer: "How many participants are needed to detect a clinically meaningful treatment effect?" or: "How many participants are needed to estimate the treatment effect with adequate precision?"

When Simulation Is the Better Choice

Closed-form sample size formulas are extremely useful when the design is simple. Simulation becomes increasingly attractive when the planned study contains:

  • More than two treatment groups
  • Several post-baseline visits
  • Unequal visit spacing
  • Complex covariance structures
  • Nonlinear treatment trajectories
  • Dropout dependent on previous observations
  • Intercurrent events
  • Multiple treatment-by-time interactions
  • Baseline covariates
  • Unequal treatment allocation
  • Multiple endpoints

In these situations, simulation allows the exact planned analysis to be evaluated under the assumed data-generating mechanism.

Best practice: When the final analysis will use an MMRM or another complex longitudinal model, the most defensible sample size calculation is often one that simulates data under the expected covariance structure and then applies the actual planned analysis to each simulated dataset.

Repeated Measures Designs and Regulatory Clinical Trials

Longitudinal endpoints are common in confirmatory clinical trials because treatment effects often evolve over time. The statistical design should therefore distinguish between:

  • The scientific trajectory of the endpoint
  • The primary estimand
  • The primary timepoint, if one exists
  • The repeated-measures covariance structure
  • The handling of missing observations
  • The inferential method used for the primary analysis

A sample size calculation should be aligned with these choices. A generic "repeated measures" calculation is not sufficient simply because the study contains repeated observations.

Summary

Repeated measures designs can be substantially more statistically efficient than designs that rely on independent observations because each participant provides information at multiple timepoints and can serve as his or her own reference. The magnitude of that efficiency depends heavily on the within-subject correlation.

For a two-timepoint design, the variance of a change score is:

$$ \operatorname{Var}(\Delta) = 2\sigma^2(1-\rho) $$

This simple equation provides considerable intuition. As the within-subject correlation increases, the variability of change decreases, and fewer participants may be required to detect the same treatment difference.

With three or more repeated measurements, sample size planning becomes more complex. Repeated measures ANOVA calculations may involve effect size \(f\), the number of measurements, and nonsphericity. Longitudinal mixed models additionally require assumptions about the covariance structure, treatment trajectory, and missing-data process.

The most important lesson is that there is no single sample size formula for all repeated measures designs. The calculation must be tied to the scientific question and the planned primary analysis.

Bottom line: Start with the primary treatment effect you need to detect, not with the number of visits. Then specify the expected variability, within-subject correlation or covariance structure, analysis model, alpha, and power. For simple two-timepoint designs, closed-form calculations can be highly informative. For complex longitudinal trials, simulation using the planned MMRM or mixed-effects analysis is often the most defensible approach.

References

Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences. 2nd ed. Lawrence Erlbaum Associates.
Fitzmaurice, G.M., Laird, N.M. & Ware, J.H. (2011). Applied Longitudinal Analysis. 2nd ed. Wiley.
Diggle, P., Heagerty, P., Liang, K.-Y. & Zeger, S. (2002). Analysis of Longitudinal Data. 2nd ed. Oxford University Press.
Liu, G.F. & Lu, K. (2009). Sample size calculations for studies with correlated repeated observations. Biometrics.
Overall, J.E. & Doyle, S.R. (1994). Estimating sample sizes for repeated-measures designs. Psychological Methods.
Frison, L. & Pocock, S.J. (1992). Repeated measures in clinical trials: analysis using mean summary statistics and its implications for design. Statistics in Medicine.
Gueorguieva, R. & Krystal, J.H. (2004). Move over ANOVA: progress in analyzing repeated-measures data and its reflection in papers published in the Archives of General Psychiatry. Archives of General Psychiatry.