Why Flatness Is a Distinct Profile Hypothesis
A group can have the same mean response at every occasion, or its mean can rise and fall over occasions. The question of profile flatness asks whether the first description holds separately for every group. It is not the same as asking whether groups have the same profile shape: several groups can rise by the same amount at each occasion and therefore be parallel without being flat.
The useful move is to replace each response vector by its within-subject occasion contrasts. A constant mean profile has zero value on every such contrast. This turns a statement about repeated occasion means into a multivariate mean hypothesis, which can be tested using the MANOVA framework.
Writing Flatness as a Contrast Hypothesis
Let \(C\) be a \(p\times q\) matrix of full column rank whose columns are occasion contrasts: \(C'\mathbf{1}_p=0\). For a complete basis of the occasion-contrast space, \(q=p-1\). If \(Y_{ig}\) is the response vector for subject \(i\) in group \(g\), define the transformed response \(Z_{ig}=C'Y_{ig}\), with mean \(\eta_g=C'\mu_g\). The test of flatness is
The contrast basis can be chosen in different ways. For example, adjacent differences detect changes between neighboring occasions. What matters is that the columns span the whole space perpendicular to \(\mathbf{1}_p\); otherwise, a nonconstant profile could escape detection.
To verify the result, \(C'\mathbf{1}_p=0\) shows that every constant vector \(\alpha_g\mathbf{1}_p\) has zero contrasts. Conversely, the null space of \(C'\) has dimension \(p-(p-1)=1\). It contains \(\mathbf{1}_p\), so it consists exactly of the multiples of \(\mathbf{1}_p\). Thus \(C'\mu_g=0\) forces \(\mu_g=\alpha_g\mathbf{1}_p\). This also explains why a complete contrast basis is needed.
Worked Example: Contrasts Identify Flat and Nonflat Profiles
Suppose there are three occasions and use the two adjacent contrasts \(C'=\begin{pmatrix}-1&1&0\\0&-1&1\end{pmatrix}\). For a group with mean profile \(\mu=(4,4,4)'\), calculate \(C'\mu\).
The first contrast is \(-4+4=0\), and the second is \(-4+4=0\). Thus \(C'\mu=(0,0)'\), as required for a flat profile.
For \(\mu=(2,4,6)'\), the contrasts are \(-2+4=2\) and \(-4+6=2\), so \(C'\mu=(2,2)'\). Since this is not zero, the profile is not flat. Both contrasts are needed: a profile can change between occasions in more than one way, and flatness requires every independent occasion contrast to vanish.
Testing the Hypothesis with MANOVA
For an exact classical test, assume subjects are independent, and within each group the response vectors are multivariate normal with a common positive-definite covariance matrix \(\Sigma\). Group sizes \(n_g\) may differ; write \(N=\sum_{g=1}^G n_g\). Under the contrast transformation, the covariance matrix is \(\Omega=C'\Sigma C\), which is positive definite because \(C\) has full column rank. The transformed observations in each group have mean \(\eta_g\) and common covariance \(\Omega\).
Write \(\bar Z_g\) for the sample mean transformed response in group \(g\). The hypothesis sum-of-products matrix for testing that every group mean is zero, and the within-group residual sum-of-products matrix, are
Here \(H\) measures the transformed group means relative to zero, not their differences from one another. The matrix \(E\) estimates the common within-group covariance up to its degrees of freedom. A standard MANOVA criterion, such as Wilks' lambda \(\Lambda=|E|/|E+H|\), tests the joint null. For \(q=1\), this reduces to the familiar exact \(F\)-test for all \(G\) group means being zero.
For the justification, form the \(n_g\times q\) data matrix for each group. Its rows have mean \(\eta_g'\) and covariance \(\Omega\). Under \(H_0\), multiplying that matrix by the normalized vector \(n_g^{-1/2}\mathbf{1}_{n_g}\) gives \(\sqrt{n_g}\bar Z_g'\), a mean-zero multivariate normal vector with covariance \(\Omega\). The squared outer products of these \(G\) independent vectors sum to \(H\), giving the stated Wishart distribution with \(G\) degrees of freedom.
Within group \(g\), the centering matrix \(I_{n_g}-n_g^{-1}\mathbf{1}_{n_g}\mathbf{1}_{n_g}'\) is a symmetric projection of rank \(n_g-1\). It produces the residual cross-products for that group. The mean direction and the centered residual directions are orthogonal. For multivariate normal observations, orthogonal projections of the data are independent; hence the group mean contribution and residual contribution are independent. Summing the independent group residual contributions gives \(E\) with \(\sum_g(n_g-1)=N-G\) degrees of freedom. The same orthogonality gives independence of \(H\) and \(E\). Finally, the normal-theory rank property of a Wishart matrix with positive-definite scale gives nonsingular \(E\) when its degrees of freedom are at least \(q\). \(\square\)
Worked Example: Exact Flatness Test with Two Occasions
There are two groups with four subjects each and two occasions. Let the contrast be \(Z=Y_1-Y_2\). The observed contrasts are \(1,2,3,2\) in group 1 and \(-1,0,1,0\) in group 2. Test whether both groups have flat mean profiles, using the pooled-variance \(F\)-test.
The group means are \(\bar Z_1=(1+2+3+2)/4=2\) and \(\bar Z_2=(-1+0+1+0)/4=0\). The hypothesis sum of squares is \(H=4(2^2)+4(0^2)=16\).
For group 1 the residual sum of squares is \((1-2)^2+(2-2)^2+(3-2)^2+(2-2)^2=2\). For group 2 it is \((-1-0)^2+(0-0)^2+(1-0)^2+(0-0)^2=2\). Thus \(E=2+2=4\), with \(N-G=8-2=6\) residual degrees of freedom. The numerator has \(G=2\) degrees of freedom, so
Under the null and the stated normal, common-variance assumptions, this has an \(F_{2,6}\) distribution. The test is of both transformed group means being zero. It is not a test that the two groups have equal mean differences.
Flatness Is Not Parallelism
Using the same contrast matrix in every group, parallelism asks whether groups have the same contrast vector: \(C'\mu_1=\cdots=C'\mu_G\). Flatness instead requires \(C'\mu_g=0\) for every group. Thus flatness implies parallelism, but parallelism does not imply flatness. This distinction is important because the parallel profiles may all change over time.
Worked Example: Parallel Profiles That Are Not Flat
Consider two three-occasion group mean profiles, \(\mu_1=(2,4,6)'\) and \(\mu_2=(5,7,9)'\), with the adjacent contrasts used earlier. The contrast vectors are \(C'\mu_1=(2,2)'\) and \(C'\mu_2=(2,2)'\). They are equal, so the profiles are parallel. But neither vector is zero, so neither profile is flat.
If instead the profiles are \((2,2,2)'\) and \((5,5,5)'\), both contrast vectors are zero. Both profiles are flat and, as a consequence, parallel. Their different overall levels do not prevent flatness.
Common Mistake and Practical Interpretation
A common mistake is to test whether groups have equal occasion contrasts and then call a nonsignificant result evidence of flatness. That reasoning tests parallelism: it allows all groups to share a nonzero contrast vector. The correction is to test each group's transformed mean against zero jointly. Conversely, a test of flatness does not ask whether group levels are equal; each group has its own unrestricted constant level under the flatness null.
The test is meaningful only in relation to its assumptions and design. In the exact MANOVA formulation, the repeated response vectors must be independent across subjects, multivariate normal within groups, and have a common covariance matrix; the residual matrix must also have enough degrees of freedom to estimate a nonsingular covariance. If these conditions are not credible, the stated exact reference distribution need not apply. A rejection says that at least one group has a nonzero occasion contrast, not which group or which occasions account for the departure. A failure to reject is not proof that every population profile is exactly constant.
Check Your Understanding
Answer each question by referring to the contrast hypothesis, not just to the original profile shapes.
- For three occasions, why must a complete flatness test use two linearly independent contrasts?
- Profiles \((3,5,7)'\) and \((6,8,10)'\) have the same adjacent contrasts. Are they flat, parallel, both, or neither?
- What null hypothesis is tested by \(H=\sum_g n_g\bar Z_g\bar Z_g'\)?
- In the two-occasion example, why does the numerator have two degrees of freedom rather than one?
- Does rejecting flatness establish that all groups are nonflat? Explain.