Tutorials › Model-Informed Drug Development (MIDD) › Repeated-Measure Correlation and Effective Sample Size

Model-Based Endpoint and Sample Size Planning · Tutorial 313 of 596

Repeated-Measure Correlation and Effective Sample Size

Derive the variance and effective sample size for a repeated-measure treatment contrast, then account for correlation and dropout when planning enrollment.

Advanced 12 min read

What You'll Learn

  • Derive the variance of an equally weighted average across repeated visits.
  • Interpret the effective number of independent measurements per participant.
  • Calculate sample size for a treatment contrast under compound-symmetry covariance.
  • Distinguish expected dropout inflation from planning for a target probability of adequate retention.
  • Identify when complete-case formulas are inappropriate for incomplete longitudinal data.

Why Repeated Measurements Do Not Equal Independent Participants

Longitudinal endpoints provide several measurements from each participant, but those measurements usually share subject-specific influences. A participant with a relatively high response at one visit may also tend to have a relatively high response at another. Consequently, adding visits does not provide the same precision gain as adding independent participants. The amount of gain depends on the within-subject covariance, the visits included in the contrast, and how many participants contribute the required measurements.

This tutorial focuses on a treatment contrast defined as a weighted average of post-baseline visit-specific means. The weights specify the target contrast; equal weights give the average effect over the selected visits. If treatment effects differ by visit, this weighted average is still a meaningful contrast, but it is not the effect at every visit.

Definition: For participant \(i\), let \(Y_i=(Y_{i1},\ldots,Y_{im})^\mathsf{T}\) be the vector of outcomes at \(m\) visits, with covariance matrix \(\Sigma\). A weighted longitudinal outcome is \(W_i=w^\mathsf{T}Y_i\), where the prespecified weights satisfy \(\sum_{j=1}^m w_j=1\). Its within-participant variance is \(w^\mathsf{T}\Sigma w\). For equal weights, \(w_j=1/m\).

Assume a parallel-group randomized design with \(n_T\) treatment participants and \(n_C\) control participants contributing complete visit vectors. Participants are independent of one another, and the within-participant covariance matrix is the same in both arms. The estimated contrast is the treatment-arm mean of \(W_i\) minus the control-arm mean of \(W_i\). Under these assumptions, its variance is the sum of the two arm-specific mean variances.

$$ \operatorname{Var}(\widehat{\Delta}) = \left(\frac{1}{n_T}+\frac{1}{n_C}\right)w^\mathsf{T}\Sigma w $$

For equal allocation, \(n_T=n_C=n\), this becomes \(2w^\mathsf{T}\Sigma w/n\). The formula makes the planning logic explicit: covariance and contrast weights determine the variance contributed by each participant, while the number of independent participants determines how that variance is averaged down.

Compound Symmetry and Effective Sample Size

A useful illustration assumes equal variance at every visit and a common correlation between every pair of visits. This is called compound symmetry. It is a simplifying covariance model, not a universal description of longitudinal data.

Assumption (compound symmetry): Each visit outcome has variance \(\sigma^2\), and any two distinct visits from the same participant have correlation \(\rho\), where \(0\leq \rho\leq 1\). Thus, \(\operatorname{Cov}(Y_{ij},Y_{ik})=\rho\sigma^2\) for \(j\ne k\). Outcomes from different participants are independent.

For an equally weighted average, the variance is obtained by summing the \(m\) individual variances and the \(m(m-1)\) off-diagonal covariances, then dividing by \(m^2\). This gives the central relationship between repeat measurements and precision.

$$ \begin{aligned} \operatorname{Var}(W_i) &=\frac{1}{m^2}\left[m\sigma^2+m(m-1)\rho\sigma^2\right] \\ &=\frac{\sigma^2}{m}\left[1+(m-1)\rho\right] \\ &=\sigma^2\left[\rho+\frac{1-\rho}{m}\right]. \end{aligned} $$

If the \(m\) measurements were independent, their average would have variance \(\sigma^2/m\). Define \(m_{\mathrm{eff}}\), the effective number of independent measurements per participant, as the number of independent measurements with that same variance: \(\sigma^2/m_{\mathrm{eff}}=\operatorname{Var}(W_i)\). Solving gives the following result.

Result: Under compound symmetry, the effective number of independent measurements per participant for an equally weighted average is \(m_{\mathrm{eff}}=m/[1+(m-1)\rho]\). It is a variance-equivalence summary, not a literal count of independent observations.

When \(\rho=0\), \(m_{\mathrm{eff}}=m\): every visit contributes as an independent measurement. When \(\rho=1\), \(m_{\mathrm{eff}}=1\): repeated measurements are perfectly redundant for estimating the average. For positive correlation, effective information grows with visit count, but more slowly than the raw number of observations.

Worked Example: Six Visits and Their Effective Information

Suppose each participant has six scheduled outcomes, each with standard deviation 10 units, and the within-participant correlation is 0.60. Find the variance of the participant-level average and its effective number of independent measurements.

Here \(m=6\), \(\sigma^2=10^2=100\) units squared, and \(\rho=0.60\). The variance of the average is

$$ \operatorname{Var}(W_i) =100\left[0.60+\frac{1-0.60}{6}\right] =100(0.6667) =66.67\ \text{units}^2. $$

The standard deviation of this average is \(\sqrt{66.67}=8.165\) units. Its effective visit count is

$$ m_{\mathrm{eff}} =\frac{6}{1+(6-1)(0.60)} =\frac{6}{4} =1.50. $$

Thus, six correlated measurements provide the same variance for this average as 1.50 independent measurements with variance 100 units squared each. They do not provide the information of six independent observations.

From Covariance to a Sample-Size Target

For equal allocation and complete data, compound symmetry gives the treatment-contrast variance

$$ \operatorname{Var}(\widehat{\Delta}) = \frac{2\sigma^2}{n} \left[\rho+\frac{1-\rho}{m}\right]. $$

For a two-sided normal-approximation test at significance level \(\alpha\), with target power \(1-\beta\) to detect a treatment contrast of magnitude \(\delta\), the required per-arm sample size is approximately

$$ n= \frac{2\sigma^2\left[\rho+(1-\rho)/m\right] \left(z_{1-\alpha/2}+z_{1-\beta}\right)^2}{\delta^2}. $$

Here \(z_q\) is the \(q\)-quantile of the standard normal distribution. This formula assumes a prespecified contrast, a correct covariance and variance specification, independent participants, complete measurements for the analyzed contrast, and a normal approximation to the test statistic. Round the result up to a whole participant per arm. If small samples, estimated covariance parameters, or a more complex analysis materially affect the test distribution, the normal approximation should be checked rather than treated as exact.

Worked Example: Correlation Changes the Required Sample Size

Consider a hypothetical equal-allocation trial whose primary contrast is the average of four follow-up visits. Suppose the visit-level standard deviation is 8 units, the common within-participant correlation is 0.50, the target contrast is 3 units, and the design seeks 80% power with a two-sided \(\alpha=0.05\). Use \(z_{0.975}=1.960\) and \(z_{0.80}=0.842\).

First calculate the variance of one participant’s visit average:

$$ w^\mathsf{T}\Sigma w =8^2\left[0.50+\frac{1-0.50}{4}\right] =64(0.625) =40.00\ \text{units}^2. $$

Then calculate the per-arm sample size:

$$ \begin{aligned} n &=\frac{2(40.00)(1.960+0.842)^2}{3^2}\\ &=\frac{80.00(2.802)^2}{9}\\ &=\frac{80.00(7.8512)}{9} =69.79. \end{aligned} $$

Rounding up gives 70 participants per arm with complete data. For comparison, if the four visits were independent, the average variance would be \(64/4=16.00\) units squared, and the corresponding calculation would give \(n=2(16.00)(7.8512)/9=27.92\), or 28 per arm. The much larger correlated-data requirement is not a contradiction: the independent-visits calculation assumes substantially more information per participant.

Dropout: Expected Retention Versus Assurance

A simple dropout adjustment applies when participants either contribute the complete visit set to the contrast or are lost before that analysis, and this loss is independent of their outcomes. If \(N\) participants are randomized to an arm and each has probability \(q\) of providing a complete record, the number retained, \(N_{\mathrm{complete}}\), follows a binomial distribution with parameters \(N\) and \(q\). Its expectation is \(Nq\). Inflating a complete-data target \(n\) to \(N=n/q\) matches the target only in expectation; it does not guarantee that at least \(n\) participants will be retained.

Worked Example: Probability of Reaching a Complete-Data Target

Suppose a hypothetical trial plans to randomize 160 participants to an arm, and the probability of retaining a participant with all required visits is \(q=0.80\). Let \(N_{\mathrm{complete}}\sim\operatorname{Binomial}(160,0.80)\). The expected complete count and its standard deviation are

$$ E(N_{\mathrm{complete}})=160(0.80)=128,\qquad SD(N_{\mathrm{complete}})=\sqrt{160(0.80)(0.20)}=\sqrt{25.6}=5.060. $$

For a target of at least 122 complete participants, use a continuity-corrected normal approximation:

$$ \begin{aligned} P(N_{\mathrm{complete}}\geq122) &\approx P\left(Z\geq\frac{121.5-128}{5.060}\right)\\ &=P(Z\geq-1.285)\\ &\approx 0.901. \end{aligned} $$

The result is an approximate 90.1% probability of reaching at least 122 complete participants under the stated binomial-retention model. The 122 target is not an assurance that the analysis will have its intended precision; it is a retention threshold chosen for this illustration. If the design requires a specified probability of reaching its complete-data sample-size target, choose randomized enrollment from the binomial tail probability, not only from the expected-count equation \(Nq=n\).

When dropout occurs at visits rather than as whole-participant loss, the complete-case probability may depend on the full retention pattern. For example, if visit retention probabilities are independent and equal to \(r\), the probability of retaining all \(m\) visits is \(r^m\), not \(r\). This all-visits calculation is appropriate only for an analysis that requires complete records. A longitudinal analysis that uses available measurements can retain information from participants with partial records, so multiplying the complete-data target by \(1/q\) may overstate or misstate its sample-size requirement. The appropriate variance then depends on the missingness pattern and the analysis model.

Diagnostics, Alternatives, and Limitations

The compound-symmetry formula is valuable because it isolates the effect of repeat-measure correlation. Before using it, check that its assumptions are credible for the endpoint and visit schedule. In particular, equal visit variances and one common correlation may be implausible when variability changes over time or nearby visits are more strongly correlated than distant ones. A general covariance matrix handles those differences directly through \(w^\mathsf{T}\Sigma w\); it does not require all correlations to be equal.

Compare the implied correlations and variances with available longitudinal data or defensible prior knowledge. Check that the proposed matrix is a valid covariance matrix and that its implied variance for the planned contrast is positive. Examine sensitivity to plausible covariance values: when the estimated required sample size changes substantially, the plan depends strongly on an uncertain input. An effective visit count much lower than \(m\) is a useful warning that raw measurement count is exaggerating information, not a reason by itself to discard repeated measures.

The principal alternatives answer related but different questions:

ApproachWhat it representsMain caution
Single prespecified visitA contrast at one visit, with variance based on that visit’s outcomeIt does not target an average across visits
Compound-symmetry averageAn equally weighted visit average under a common variance and correlationCan misrepresent time-varying covariance
General covariance and weightsA specified longitudinal contrast using the planned covariance matrixRequires credible covariance inputs and a clear contrast definition
Enrollment inflation by \(1/q\)An expected-count adjustment for complete-case retentionDoes not control the probability of meeting a retention target

These calculations are planning approximations, not substitutes for defining the estimand and analysis. They assume that the contrast and weights are fixed in advance, the variance inputs are appropriate, and dropout is handled as stated. They do not establish that missing outcomes can be ignored, nor do they account for outcome-dependent dropout. Where partial records are analyzed or the missingness process is complex, the simple complete-case calculation is not sufficient.

Common Pitfall

A frequent error is to count every visit as an independent observation and divide the variance by \(m\), even when within-subject correlation is positive. The mistaken reasoning is: “There are four visits, so each participant supplies four independent units of information.” Under compound symmetry, the correct factor is \(\rho+(1-\rho)/m\), which exceeds \(1/m\) whenever \(\rho>0\). A related error is to inflate enrollment by \(1/q\) and describe the resulting expected count as guaranteed. The correction is to state whether the target is an expected retained count or a probability of meeting a minimum count, and calculate the binomial tail for the latter.

Key takeaway: For an equally weighted average under compound symmetry, repeated-measure precision depends on \(\sigma^2[\rho+(1-\rho)/m]\), not simply on \(\sigma^2/m\). Translate that variance into the treatment-contrast variance, then distinguish the complete-data analysis target from the enrollment needed to achieve it under dropout.

Check Your Understanding

Answer each question using the stated assumptions. Solutions follow the questions.

  1. With \(m=5\) visits and \(\rho=0.50\), what is the effective number of independent measurements per participant?
  2. If \(m=3\), \(\sigma=6\) units, and \(\rho=0.20\), calculate the variance of an equally weighted participant average.
  3. Why does \(N=n/q\) not guarantee at least \(n\) complete participants?
  4. Under what condition does the effective visit count equal the actual number of visits?

Solutions. (1) \(m_{\mathrm{eff}}=5/[1+4(0.50)]=5/3=1.667\). (2) \(\operatorname{Var}(W_i)=36[0.20+0.80/3]=36(0.4667)=16.80\) units squared. (3) \(N=n/q\) sets the expected complete count to \(n\), but the binomial count varies around that expectation and can fall below it. A probability target requires evaluating \(P\{\operatorname{Binomial}(N,q)\geq n\}\). (4) When \(\rho=0\), the visits are independent under the stated model, so \(m_{\mathrm{eff}}=m\).