From Repeated Measurements to a Response Vector
When the same subject is measured at several occasions, the recorded outcomes are not separate subjects: they are components of one subject’s repeated-measurement profile. A useful way to analyze a planned within-subject effect is to transform that profile into one or more contrast outcomes. The choice of transformation makes the target explicit: a transformed coordinate might represent a change from baseline, a difference between two periods, or a weighted comparison of several occasions.
The transformation is performed separately for each subject. The resulting contrast coordinates form a multivariate response, one vector per subject. This allows a multivariate model to address the chosen within-subject effects while preserving the fact that the coordinates came from measurements on the same subject.
Each row of \(C\) describes one coordinate of the transformed response. For example, the row \((-1,1,0)\) applied to three occasions produces the second-occasion outcome minus the first. A row such as \((-1/2,-1/2,1)\) compares the third occasion with the average of the first two. The entries specify both which occasions contribute and how they are weighted.
A contrast matrix need not contain every possible within-subject contrast. It should contain the contrasts needed for the scientific question. If \(q<p\), the transformation usually retains only selected information about the original profile. It is therefore important to describe the transformed coordinates precisely rather than referring to them vaguely as “the repeated measures.”
Worked Example: Two Changes Within Each Subject
A subject is measured on four occasions, with observed response vector \(y_i=(8,11,13,16)^T\). Suppose the planned coordinates compare occasions 2 and 1, and occasions 4 and 3. Use the contrast matrix
Multiplying the matrix by the subject’s response vector gives
The transformed response records an increase of 3 units from occasion 1 to 2 and an increase of 3 units from occasion 3 to 4. It does not, by itself, report the change from occasion 2 to 3.
The Transformed Multivariate Model
Collect \(n\) subjects’ response vectors as the rows of an \(n\times p\) matrix \(Y\), so row \(i\) of \(Y\) is \(y_i^T\). The transformed data matrix is \(Z=YC^T\); its \(i\)th row is \(z_i^T\). Thus, the transformation changes the response dimension from \(p\) occasions to \(q\) contrast coordinates while leaving the subjects as the rows.
For example, suppose a multivariate linear model has conditional mean \(E[Y\mid X]=XB\), where \(X\) is an \(n\times k\) design matrix and \(B\) is a \(k\times p\) matrix of response coefficients. The transformed response has the corresponding mean model \(E[Z\mid X]=XB C^T\). The coefficient matrix is transformed in the same way as the response. This is a direct consequence of applying the same fixed transformation to every subject.
To verify the result, use the fact that conditional expectation is linear and that \(C\) is fixed:
At the subject level, the same calculation is \(E[Cy_i\mid X]=C E[y_i\mid X]=C\mu_i\). These identities require no distributional assumption beyond the existence of the expectations. They say how the mean changes; they do not assert that the transformed coordinates are independent.
In this model, a statement that a design effect has no transformed mean contribution can be written as a zero restriction on the corresponding rows of \(B C^T\). For example, if \(L\) is a matrix that selects or contrasts design coefficients, the transformed effect is represented by \(LBC^T\), and its null hypothesis is \(LBC^T=0\). The rows of \(C\) determine which occasion patterns that hypothesis concerns.
Worked Example: Comparing Group Changes
Two groups have mean profiles at baseline, week 4, and week 8. Let the mean profile in group A be \(\mu_A=(20,24,29)^T\), and in group B be \(\mu_B=(22,25,35)^T\). Choose contrasts for week-4 change from baseline and week-8 change from baseline:
For group A, the transformed mean is
For group B, it is
The group B minus group A difference in transformed means is \((-1,4)^T\): group B’s mean baseline-to-week-4 change is 1 unit smaller, while its mean baseline-to-week-8 change is 4 units larger. This is a comparison of changes, not a comparison of the groups’ raw levels at each occasion.
Which Effects Does a Transformation Retain?
A transformation can be used to study a particular linear feature of the original profile only if that feature is represented by the rows of \(C\). The following result makes that statement precise. It concerns whether a target can be recovered from the transformed response for every possible profile, not whether a statistical test has adequate precision or power.
For the forward direction, suppose \(h^T=a^T C\). Then, for every profile \(y\),
The target is therefore a linear function of the transformed response. Conversely, suppose the target is determined by \(Cy\) for every \(y\). If \(v\) is in the null space of \(C\), then \(C(y+v)=Cy\). The transformed responses for \(y\) and \(y+v\) are identical, so their targets must be identical. Hence \(h^T(y+v)=h^T y\), which gives \(h^T v=0\) for every \(v\) in the null space of \(C\). Thus \(h\) is orthogonal to that null space. The fundamental theorem of linear algebra states that the orthogonal complement of the null space of \(C\) is the row space of \(C\); therefore \(h^T\) belongs to the row space of \(C\). This proves both directions. \(\square\)
Worked Example: A Weighted Late-versus-Early Comparison
Suppose four occasions are recorded, and the target is the average of the last two outcomes minus the average of the first two. The target row is
Take \(C\) to have this single row, and suppose the observed profile is \(y=(10,12,15,19)^T\). Then
The transformed response is exactly the chosen target: the late-period average is \((15+19)/2=17\), the early-period average is \((10+12)/2=11\), and their difference is \(17-11=6\). A different target, such as occasion 2 minus occasion 1, is not represented by this single row, so this transformation does not retain enough information to recover that difference for every possible profile.
What the Transformation Leaves Out
When \(C\) has fewer than \(p\) rows, many different profiles can produce the same transformed response. In particular, if \(v\) satisfies \(Cv=0\), then \(C(y+v)=Cy\). Any feature that changes along such a direction is invisible after transformation. This is not a flaw when the omitted information is irrelevant to the planned question; it is a limitation if conclusions are later extended to effects the transformation did not preserve.
For a contrast matrix whose rows sum to zero, adding the same constant to every occasion leaves all transformed coordinates unchanged. That is appropriate when the target concerns within-subject differences rather than overall level. It also means that the contrast response alone cannot tell whether one subject’s entire profile is higher than another’s by a constant amount.
The contrast coordinates are still a joint response. They come from the same subject and may be statistically dependent. A multivariate analysis must treat them as coordinates of that subject’s response vector, rather than as if they were outcomes from unrelated subjects. The chosen matrix defines the scientific targets; the joint model handles their sampling behavior.
Common Pitfall
- Wrong reasoning: “I transformed each subject’s measurements into a few contrasts, so the transformation contains the complete repeated-measures profile.”
- Correction: A transformation with fewer than \(p\) linearly independent rows discards some directions in the original \(p\)-dimensional profile. It retains a target only when that target lies in the row space of \(C\). State the contrasts explicitly and restrict interpretation to the effects they represent.
- Wrong reasoning: “A transformed coordinate is a new independent outcome because it has a separate column.”
- Correction: A separate coordinate is not a separate subject. All coordinates for a subject are computed from that subject’s measurements and must be analyzed jointly when their dependence matters.
Check Your Understanding
For each question, identify what the transformation does and what it does not establish.
- For three occasions, what does the row \((-1,0,1)\) produce when applied to a subject’s response vector?
- Write the transformed response matrix when \(Y\) is \(n\times p\) and \(C\) is \(q\times p\). What are its dimensions?
- For the profile \(y=(4,7,10)^T\), calculate the transformed response under \(C=\begin{pmatrix}-1&1&0\\-1&0&1\end{pmatrix}\).
- State the condition under which a linear target \(h^T y\) can be determined from \(Cy\) for every profile \(y\).
- Why can two profiles have the same transformed response even though their original measurements differ?