Tutorials › Multivariate Statistics (Graduate) › Worked Design of a Scientific Contrast Family

Simultaneous Multivariate Inference · Tutorial 232 of 975

Worked Design of a Scientific Contrast Family

Translate scientific comparisons into a contrast family, then verify what the design can estimate and what joint coverage the analysis must deliver.

Intermediate 11 min read

What You'll Learn

  • Express comparisons among group means as rows of a contrast matrix
  • Check whether a contrast is valid and whether family members are redundant
  • Use the design matrix to determine which specified contrasts are estimable
  • Separate the number of listed contrasts from the rank of their span
  • State the simultaneous coverage event that matches a scientific question

From a Scientific Question to a Contrast Family

A multivariate analysis can produce many intervals, but the intervals are useful only if they answer the intended scientific question. That question determines which mean differences matter, how each difference should be encoded, and what it means for the full set of results to cover successfully. The design matters too: a contrast that is scientifically meaningful may not be estimable if the study did not observe the groups needed to identify it.

This tutorial develops a practical design sequence: write the mean vector in a stated order, translate each requested comparison into a coefficient row, check the matrix’s rank and the design’s estimability, and state the joint coverage target. The goal is not to choose an interval procedure, but to define precisely what the procedure must cover.

Definition: Let \(\mu=(\mu_1,\ldots,\mu_p)^\top\) be a vector of means in a fixed, stated order. A contrast is a linear function \(c^\top\mu\), where \(c\in\mathbb{R}^p\) and \(\sum_{k=1}^p c_k=0\). A contrast family is a specified collection of such functions, represented by a matrix \(C\) whose \(j\)th row is \(c_j^\top\). The vector of targets is \(C\mu\).

For example, with means ordered as control, low dose, and high dose, the difference between high dose and control is \((0,-1,1)\mu\). The zero-sum condition makes this a comparison of means rather than a general linear combination that also depends on their common level. Always state the ordering: the same row has a different interpretation if the coordinates are reordered.

Worked Example: Comparisons With a Control

Worked Example: Comparisons With a Control

A trial has a control group and three active treatments. Order the means as \(\mu=(\mu_0,\mu_1,\mu_2,\mu_3)^\top\), with control first. The research question asks for each active treatment’s difference from control. Write the family and check its rank.

Treatment 1 minus control has coefficients \((-1,1,0,0)\); treatment 2 minus control has \((-1,0,1,0)\); and treatment 3 minus control has \((-1,0,0,1)\). Thus

$$ C= \begin{pmatrix} -1&1&0&0\\ -1&0&1&0\\ -1&0&0&1 \end{pmatrix}, \qquad C\mu= \begin{pmatrix} \mu_1-\mu_0\\ \mu_2-\mu_0\\ \mu_3-\mu_0 \end{pmatrix}. $$

Every row sums to zero, as required. The three rows are linearly independent: in any linear combination of rows equal to zero, the coefficients in columns 2, 3, and 4 are exactly the three combination weights, so each weight must be zero. Therefore \(\operatorname{rank}(C)=3\).

For an illustration of the target values, suppose the observed group means are \(12,15,14,18\), in the stated order. The estimated differences are \(15-12=3\), \(14-12=2\), and \(18-12=6\). These point estimates do not by themselves provide simultaneous intervals; they identify the three quantities those intervals must address.

Rank and the Meaning of Redundancy

The rank of \(C\) is the dimension of the linear span of its rows: it counts the number of linearly independent contrast directions, not necessarily the number of rows. A dependent row is a linear combination of other rows, so it adds no new direction to that span. The number of requested interval statements and the rank therefore answer different questions. Rank is useful for describing the family’s linear structure, but it does not by itself determine a procedure or the simultaneous coverage event.

For instance, adding the contrast \(\mu_2-\mu_1\) to the three treatment-versus-control contrasts does not add a direction, because \((\mu_2-\mu_1)=(\mu_2-\mu_0)-(\mu_1-\mu_0)\). It may still be scientifically useful to report that comparison. If it is included, the family has four listed contrasts but rank three. Also, a basis for the row space is not automatically a replacement for the original family’s coordinatewise interval target: covering the basis contrasts does not, without further reasoning, assert coverage for every listed contrast.

Worked Example: A Two-Factor Scientific Question

Worked Example: Average Effects and an Interaction

A balanced \(2\times2\) experiment has cell means \(\mu_{00},\mu_{10},\mu_{01},\mu_{11}\), ordered as \((00,10,01,11)\). The first index denotes factor A and the second factor B. The questions are the average effect of A across B, the average effect of B across A, and the difference-in-differences interaction.

The average effect of A is the average of its effect at the two B levels: \[ \frac{(\mu_{10}-\mu_{00})+(\mu_{11}-\mu_{01})}{2}. \] The average effect of B is \[ \frac{(\mu_{01}-\mu_{00})+(\mu_{11}-\mu_{10})}{2}, \] and the interaction is \((\mu_{11}-\mu_{10})-(\mu_{01}-\mu_{00})\). Hence

$$ C= \begin{pmatrix} -\tfrac12&\tfrac12&-\tfrac12&\tfrac12\\ -\tfrac12&-\tfrac12&\tfrac12&\tfrac12\\ 1&-1&-1&1 \end{pmatrix}. $$

Each row sums to zero. To verify rank three, suppose a linear combination with weights \(a,b,d\) of these rows is zero. The first and second columns give \(-a/2-b/2+d=0\) and \(a/2-b/2-d=0\). Adding these equations gives \(-b=0\), so \(b=0\); then \(d=a/2\). The third column gives \(-a/2+b/2-d=0\), so with \(b=0\) and \(d=a/2\), it implies \(-a=0\). Thus \(a=d=0\) as well, and the rows are independent.

If the observed cell means are \(10,13,12,18\), the three estimated contrasts are \((13-10+18-12)/2=4.5\), \((12-10+18-13)/2=3.5\), and \(18-13-12+10=3\). These are three distinct, specified scientific targets. In particular, the interaction is not the same question as either average main effect.

Estimability Depends on the Design

A contrast matrix describes what the investigator wants to learn. It does not guarantee that the data can identify every row. In a fixed-design linear model, write \(E[Y]=X\beta\), where \(X\) is the design matrix and \(\beta\) is the parameter vector. A linear function \(a^\top\beta\) is estimable if some linear combination of the observations has that expectation.

Theorem: In the model \(E[Y]=X\beta\), the linear function \(a^\top\beta\) is estimable if and only if \(a\) belongs to the row space of \(X\), equivalently if and only if there exists a vector \(d\) such that \(X^\top d=a\). Consequently, every row of a target matrix \(C\) is estimable if and only if every row of \(C\) belongs to the row space of \(X\).

Proof. If \(X^\top d=a\), then \(E[d^\top Y]=d^\top X\beta=a^\top\beta\), so \(a^\top\beta\) is estimable by definition. Conversely, if a linear combination \(d^\top Y\) has expectation \(a^\top\beta\) for every \(\beta\), then \(d^\top X\beta=a^\top\beta\) for every \(\beta\). Equality of these linear functions for every \(\beta\) requires \(X^\top d=a\). The vectors of the form \(X^\top d\) are exactly the row space of \(X\), proving the equivalence. Applying the criterion row by row proves the matrix statement. \(\square\)

When \(\beta\) is the vector of group means and \(X\) has one indicator column per group, this condition has a direct interpretation: a group mean cannot be recovered if its group has no observations. More generally, if cell means are represented as \(\mu=K\beta\), then a target \(c^\top\mu\) is estimable precisely when \(c^\top K\) lies in the row space of \(X\). This formulation separates the scientific definition of a target from the parameterization and design used to estimate it.

Worked Example: A Missing Group

Worked Example: A Missing Group

Suppose the mean vector is \(\mu=(\mu_A,\mu_B,\mu_C)^\top\), but the study observed five units in group A, four in group B, and none in group C. In the group-means parameterization, every row of \(X\) is either \((1,0,0)\) or \((0,1,0)\). Thus the row space of \(X\) consists of vectors \((u,v,0)\).

The requested family contains \(B-A\) and \(C-A\): \[ C= \begin{pmatrix} -1&1&0\\ -1&0&1 \end{pmatrix}. \] Its two rows are independent, so \(\operatorname{rank}(C)=2\). But the first row \((-1,1,0)\) belongs to the row space of \(X\), while the second row \((-1,0,1)\) does not, because its third coordinate is nonzero. The observed data can estimate \(B-A\), but cannot estimate \(C-A\).

This example shows why checking the rank of \(C\) is not enough. The matrix has rank two, yet only one of its two targets is estimable. A valid analysis must not present an interval for the unobserved-group contrast as though the data identify it. The research question would need to be narrowed, or the design would need observations that make the target estimable.

State the Simultaneous Coverage Target

Once the rows of \(C\) have been chosen and their estimability checked, state what successful joint inference means. If \([L_j,U_j]\) is an interval for the \(j\)th contrast, the simultaneous coverage target at level \(1-\alpha\) is

$$ P\left( L_j\le c_j^\top\mu\le U_j \text{ for every }j=1,\ldots,m \right)\ge 1-\alpha, $$

where \(m\) is the number of listed rows. The event requires all specified contrasts to be covered together, not merely each contrast considered separately. This statement makes the family’s scientific scope explicit: if one requested comparison is omitted from \(C\), it is not part of this coverage claim. Conversely, adding a scientifically important comparison changes the stated target even if it is linearly dependent on existing rows.

Key takeaway: Design the family by naming the means and their order, writing one coefficient row for each requested comparison, checking both row rank and estimability, and then stating the joint event the intervals must cover. A scientific target, a design’s ability to estimate it, and a simultaneous coverage claim are related but distinct decisions.

Common Mistakes

  • Using an ambiguous mean order. A row has meaning only relative to the stated order of coordinates. Write the group order before interpreting coefficients.
  • Treating rank as an estimability check. Rank describes dependencies among rows of \(C\); estimability requires checking those rows against the row space of \(X\).
  • Assuming a contrast is estimable because its coefficients sum to zero. Zero-sum coefficients make a group-mean comparison a contrast, but missing or confounded design information can still make it unestimable.
  • Equating separate coverage with simultaneous coverage. Intervals that each have a stated marginal coverage level do not, just by that fact, guarantee that all intervals cover their targets together.

Check Your Understanding

For each question, distinguish the scientific target from what the design can estimate.

  1. With means ordered \((\mu_0,\mu_1,\mu_2)\), write the row for the average of treatments 1 and 2 minus control.
  2. If a contrast matrix has five rows but rank three, what does rank say, and what does it not say about the requested interval statements?
  3. In the missing-group example, why is \(C-A\) not estimable even though its coefficient row sums to zero?
  4. State the simultaneous coverage event for a family of \(m\) contrasts using interval endpoints \(L_j,U_j\).
  5. If \(\mu=K\beta\), which row-space condition checks estimability of \(c^\top\mu\) in the model \(E[Y]=X\beta\)?
Clinical Biostats