Tutorials › Multi-Arm Multi-Stage (MAMS) Designs › A Workflow for Shared-Control Dependence Calculations

Shared-Control Correlation · Tutorial 109 of 499

A Workflow for Shared-Control Dependence Calculations

Learn to move systematically from group-level information to a checked covariance matrix and interpret the resulting shared-control correlations.

Advanced 12 min read

What You'll Learn

  • Define valid contrasts by checking that each coefficient row sums to zero.
  • Calculate group-mean variances from group sizes and outcome variances.
  • Construct contrast covariance matrices using coefficient products.
  • Convert covariance entries to correlations without confusing the two.
  • Check signs, units, symmetry, diagonal entries, and positive semidefiniteness.
  • Recognize when plug-in estimates or model assumptions limit the calculation.

Why Use a Calculation Workflow?

In a multi-arm trial, several treatment-versus-control comparisons reuse the same control group. Their estimates are therefore dependent, even when outcomes from different participants are independent. The dependence can be calculated systematically from the group sizes, group variances, and contrast definitions. A reliable workflow is useful because sign errors, mismatched group order, and confusion between covariance and correlation can all produce plausible-looking but incorrect results.

This tutorial develops a calculation sequence: define the contrasts, calculate the variance of each group mean, assemble the contrast covariance matrix, standardize its entries to obtain correlations, and check the result. The calculations concern the sampling variation of estimates; the expected treatment effects do not determine their covariance.

Definition: Let group \(g=0\) denote the control and groups \(g=1,\ldots,K\) denote treatment arms. Write \(\bar X_g\) for the sample mean in group \(g\), \(n_g\) for its sample size, and \(\sigma_g^2\) for its outcome variance. A contrast is a linear combination \(C_j=\sum_{g=0}^K a_{jg}\bar X_g\) whose coefficients satisfy \(\sum_{g=0}^K a_{jg}=0\). The row \((a_{j0},\ldots,a_{jK})\) is the coefficient row for contrast \(j\).

Assumptions and the Calculation Formula

For the basic calculation, assume that observations are independent within and across groups, each group has finite outcome variance \(\sigma_g^2\), and group \(g\) has \(n_g\) observations. Then \(\operatorname{Var}(\bar X_g)=\sigma_g^2/n_g\), and the group means are mutually uncorrelated. A normal outcome model is not required for this covariance calculation; normality may be added when a joint normal model for inference is needed. The arms need not have equal sample sizes or equal variances.

Let \(D\) be the diagonal matrix whose \(g\)th diagonal entry is \(\sigma_g^2/n_g\). Put the contrast coefficient rows into a matrix \(A\). For the vector of contrasts \(C=A\bar X\), where \(\bar X=(\bar X_0,\ldots,\bar X_K)^\mathsf{T}\), the covariance matrix is \(ADA^\mathsf{T}\). In particular, the covariance between contrasts \(j\) and \(\ell\) is a weighted sum over the groups they both involve.

$$ \operatorname{Cov}(C_j,C_\ell) =\sum_{g=0}^K a_{jg}a_{\ell g}\frac{\sigma_g^2}{n_g}, \qquad \operatorname{Var}(C_j) =\sum_{g=0}^K a_{jg}^2\frac{\sigma_g^2}{n_g}. $$

If the variances are estimated from data, replace \(\sigma_g^2\) by the corresponding within-group sample variance \(s_g^2\). The resulting covariance matrix is a plug-in estimate, rather than the exact covariance matrix based on known population variances.

Deriving the Formula and Applying the Workflow

The formula follows by expanding the covariance of two linear combinations. Covariance is bilinear, so each pair of group means contributes the product of its two coefficients times the covariance of those means. Under the independence assumption, all terms for distinct groups are zero, leaving only the terms from the same group.

$$ \begin{aligned} \operatorname{Cov}(C_j,C_\ell) &=\operatorname{Cov}\left( \sum_{g=0}^K a_{jg}\bar X_g,\, \sum_{h=0}^K a_{\ell h}\bar X_h \right)\\ &=\sum_{g=0}^K\sum_{h=0}^K a_{jg}a_{\ell h}\operatorname{Cov}(\bar X_g,\bar X_h)\\ &=\sum_{g=0}^K a_{jg}a_{\ell g}\operatorname{Var}(\bar X_g) =\sum_{g=0}^K a_{jg}a_{\ell g}\frac{\sigma_g^2}{n_g}. \end{aligned} $$

For treatment-minus-control contrasts, \(C_j=\bar X_j-\bar X_0\). Each contrast has coefficient \(-1\) for control, \(+1\) for its treatment, and zero for the other treatment arms. Thus, for two distinct treatment-minus-control contrasts, the only nonzero shared contribution is the control term, \(\sigma_0^2/n_0\). The workflow below also works when contrast directions differ or coefficients are more general.

1
Specify the contrasts.
Write every coefficient row in the same group order, usually control first. Check that each row sums to zero.
2
Calculate group-mean variances.
For each group, compute \(\sigma_g^2/n_g\), or \(s_g^2/n_g\) when using estimated variances.
3
Fill the covariance matrix.
For each pair of contrasts, multiply their coefficients within each group, multiply by that group’s mean variance, and sum. The diagonal entries are contrast variances.
4
Calculate correlations and check.
Divide each covariance by the square root of the product of the corresponding variances. Verify signs, symmetry, diagonal values, and numerical validity.

Worked Example: Two Treatment Arms With a Common Variance

Suppose a hypothetical trial has \(n_0=50\) control participants, \(n_1=30\) in treatment 1, and \(n_2=40\) in treatment 2. Assume independent observations and a common outcome variance of \(64\) score-units squared in all three groups. Calculate the correlation between the two treatment-minus-control sample-mean contrasts.

The contrasts are \(C_1=\bar X_1-\bar X_0\) and \(C_2=\bar X_2-\bar X_0\), with coefficient rows \((-1,1,0)\) and \((-1,0,1)\). Both rows sum to zero, as required. The group-mean variances are \(64/50=1.28\), \(64/30=2.1333\), and \(64/40=1.600\), in score-units squared.

For the first contrast, \(\operatorname{Var}(C_1)=1.28+2.1333=3.4133\). For the second, \(\operatorname{Var}(C_2)=1.28+1.600=2.880\). Their covariance comes from the shared control term, whose coefficients are both \(-1\):

$$ \operatorname{Cov}(C_1,C_2) =(-1)(-1)(1.28)=1.28. $$

Therefore, \(\operatorname{Corr}(C_1,C_2)=1.28/\sqrt{(3.4133)(2.880)} =1.28/3.1353=0.4082\). The positive correlation reflects the fact that a higher control mean reduces both treatment-minus-control contrasts. The correlation is dimensionless; the variances and covariance are in score-units squared.

Constructing and Checking a Full Matrix

With unequal group variances and sizes, the shared-control covariance is still obtained from the control contribution, but the variances of the individual contrasts differ. These differences affect the correlations: a common covariance does not imply a common correlation.

Worked Example: Unequal Variances Across Four Groups

Consider a hypothetical study with control group 0 and three treatment groups. Suppose the group sizes are \(n_0=60\), \(n_1=40\), \(n_2=50\), and \(n_3=30\), and the outcome variances are \(\sigma_0^2=100\), \(\sigma_1^2=144\), \(\sigma_2^2=81\), and \(\sigma_3^2=121\), all in score-units squared. Assume independent observations across groups. Use treatment-minus-control contrasts \(C_j=\bar X_j-\bar X_0\), for \(j=1,2,3\).

The coefficient rows, in group order \((0,1,2,3)\), are \((-1,1,0,0)\), \((-1,0,1,0)\), and \((-1,0,0,1)\). Each sums to zero. The group-mean variances are \(v_0=100/60=1.6667\), \(v_1=144/40=3.600\), \(v_2=81/50=1.620\), and \(v_3=121/30=4.0333\), in score-units squared.

The contrast variances are \(v_0+v_1=5.2667\), \(v_0+v_2=3.2867\), and \(v_0+v_3=5.700\). Each pair of distinct contrasts shares only the control mean, so every off-diagonal covariance is \(v_0=1.6667\). In the stated contrast order, the covariance matrix is

$$ \widehat{\Sigma}_C= \begin{pmatrix} 5.2667 & 1.6667 & 1.6667\\ 1.6667 & 3.2867 & 1.6667\\ 1.6667 & 1.6667 & 5.700 \end{pmatrix} \quad\text{score-units squared}. $$

The three correlations are \(\rho_{12}=1.6667/\sqrt{(5.2667)(3.2867)}=0.4006\), \(\rho_{13}=1.6667/\sqrt{(5.2667)(5.700)}=0.3041\), and \(\rho_{23}=1.6667/\sqrt{(3.2867)(5.700)}=0.3849\). Thus the correlation matrix has ones on its diagonal and these values in the corresponding off-diagonal positions. Its symmetry is expected because covariance is symmetric.

A further numerical check is that the covariance matrix is positive definite here. Its leading principal minors are positive: the first is \(5.2667\), the second is approximately \(14.5320\), and its determinant is approximately \(68.3324\), in the corresponding powers of score-units squared. More generally, positive semidefiniteness follows from \(\Sigma_C=ADA^\mathsf{T}\) when \(D\) is a covariance matrix. A numerical failure of that property suggests an arithmetic, ordering, or input problem.

Direction, Units, and Common Failure Modes

A covariance’s sign depends on the signs of the coefficients, not simply on whether two contrasts use the same participants. Reversing one contrast changes the signs of its covariances with all other contrasts but does not change its variance. Correlation changes sign in the same way, while remaining dimensionless.

Worked Example: A Contrast With the Opposite Direction

Suppose a hypothetical study has independent groups with \(n_0=40\), \(n_1=25\), and \(n_2=50\), and variances \(\sigma_0^2=100\), \(\sigma_1^2=144\), and \(\sigma_2^2=81\). Define \(C_1=\bar X_1-\bar X_0\) and \(C_2=\bar X_0-\bar X_2\). These are both contrasts: their coefficient rows \((-1,1,0)\) and \((1,0,-1)\) each sum to zero.

The group-mean variances are \(v_0=100/40=2.500\), \(v_1=144/25=5.760\), and \(v_2=81/50=1.620\), in score-units squared. Therefore, \(\operatorname{Var}(C_1)=2.500+5.760=8.260\), and \(\operatorname{Var}(C_2)=2.500+1.620=4.120\). The control coefficients have opposite signs, so the covariance is \(\operatorname{Cov}(C_1,C_2)=(-1)(1)(2.500)=-2.500\).

The correlation is \(\operatorname{Corr}(C_1,C_2)=-2.500/\sqrt{(8.260)(4.120)} =-2.500/5.8336=-0.4286\). The negative sign is correct for these contrast directions. Replacing \(C_2\) by \(-C_2\) would reverse the covariance and correlation signs, while leaving both contrast variances unchanged.

Several checks catch common calculation errors. Confirm that all coefficient rows use the same group order and sum to zero; check that each diagonal entry is calculated as a variance, using squared coefficients; and ensure the covariance matrix is symmetric. The absolute value of every correlation must be at most one, since \(|\operatorname{Cov}(C_j,C_\ell)|\leq\sqrt{\operatorname{Var}(C_j)\operatorname{Var}(C_\ell)}\). A negative variance or a correlation outside \([-1,1]\) indicates an error or an invalid covariance estimate.

A common mistake is to treat every off-diagonal covariance as positive merely because two comparisons use a shared control. That is true for treatment-minus-control contrasts with the same orientation, but not in general: the shared group’s contribution is the product \(a_{j0}a_{\ell0}\sigma_0^2/n_0\), which is negative if the control coefficients have opposite signs. Another mistake is to report a covariance as a correlation. Covariance has squared outcome units; correlation divides by the two contrast standard deviations and has no units.

Choosing and Interpreting the Calculation

The coefficient-matrix method is efficient when there are many contrasts: construct \(A\), form the diagonal group-mean covariance matrix \(D\), and calculate \(ADA^\mathsf{T}\). The pairwise formula is often easier to audit by hand because it shows exactly which shared groups contribute. A direct simulation or empirical estimate can be useful as a check under a specified data-generating model, but it does not replace verifying that the contrast definitions and assumptions are appropriate.

The calculation relies on the stated group variances and independence of group means. If participants are clustered, observations are repeated, or groups are otherwise dependent, \(D\) is not diagonal and cross-group covariance terms must be included. If variances are estimated, plug-in correlations also carry estimation uncertainty. In that setting, the displayed numerical correlation is an estimate, not a fixed population quantity. Finally, this workflow quantifies dependence among the specified contrasts; it does not by itself define how any contrast will be used in a later decision rule.

Key takeaway: Specify valid contrast rows first, calculate each group-mean variance, and then use coefficient products to build covariances. Standardize only after the covariance matrix is complete, and check the signs, units, symmetry, and numerical validity.

Check Your Understanding

Answer each question, then compare with the short solutions below.

  1. For groups ordered control, treatment 1, treatment 2, is \((1,-1,0)\) a contrast? What comparison does it represent?
  2. Two treatment-minus-control contrasts have control mean variance \(2\) score-units squared. What is their covariance if their control coefficients are both \(-1\)?
  3. Why can two shared-control contrasts have a negative covariance?
  4. If a covariance is \(3\) score-units squared and the two contrast variances are \(4\) and \(9\) score-units squared, what is their correlation?

Solutions. (1) Yes: its coefficients sum to zero, and it represents control minus treatment 1. (2) The covariance contribution is \((-1)(-1)(2)=2\) score-units squared. (3) The shared group contributes the product of its two coefficients times its mean variance; opposite coefficient signs give a negative contribution. (4) The correlation is \(3/\sqrt{(4)(9)}=3/6=0.500\), a dimensionless quantity.

Clinical Biostats