Tutorials › Multivariate Statistics (Graduate) › Testing Equal Profile Levels

Contrasts and Repeated Measures · Tutorial 365 of 975

Testing Equal Profile Levels

Construct and interpret the contrasts for equal group-average response levels, and identify when that test does—and does not—imply equal means at every occasion.

Advanced 11 min read

What You'll Learn

  • Express equal profile levels as group contrasts of occasion-averaged means
  • Construct a contrast matrix for the group effect and a vector for averaging occasions
  • Distinguish equality of average levels from equality of group means at every occasion
  • Derive the pooled one-way F test for subject-level occasion averages
  • Check the sample-size, covariance, and distribution conditions for an exact test

What “Equal Levels” Tests

In profile analysis, each group has a mean response profile across a set of occasions. A test of equal profile levels asks whether the groups have the same average response across those occasions. It does not, by itself, ask whether their mean responses match at each occasion. That distinction matters: groups can have the same average level while having quite different profiles.

Let there be \(G\) groups and \(p\) occasions, and write \(\mu_{gj}\) for the population mean response in group \(g\) at occasion \(j\). Arrange the profiles as the \(G\times p\) matrix \(M\), whose \(g\)th row is the profile for group \(g\). We use equal weights for the occasions in defining level. Thus group \(g\)'s average level is the average of the entries in row \(g\).

Definition: The equal-profile-levels hypothesis is $$ H_0:\quad \frac{1}{p}\sum_{j=1}^{p}\mu_{1j} =\frac{1}{p}\sum_{j=1}^{p}\mu_{2j} =\cdots =\frac{1}{p}\sum_{j=1}^{p}\mu_{Gj}. $$ Equivalently, the \(G\) group-average responses are equal. The alternative is that at least two group-average responses differ.

To write this as a system of contrasts, let \(c=\frac{1}{p}\mathbf{1}_p\), where \(\mathbf{1}_p\) is the \(p\)-vector of ones. Let \(A\) be any \((G-1)\times G\) matrix of rank \(G-1\) satisfying \(A\mathbf{1}_G=0\). Then \(Mc\) is the vector of group-average responses, and the hypothesis is

$$ H_0:\quad AMc=\mathbf{0}. $$

The rows of \(A\) compare groups, while \(c\) averages over occasions. Together they specify exactly which part of the mean structure is being tested. Different full-rank choices of \(A\) give different contrast coordinates for the same equality hypothesis.

Constructing and Interpreting the Contrasts

A simple choice of group contrasts compares every group after the first with group 1:

$$ A= \begin{pmatrix} -1&1&0&\cdots&0\\ -1&0&1&\cdots&0\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ -1&0&0&\cdots&1 \end{pmatrix}. $$

Each entry of \(AMc\) is the difference between one group's average response and group 1's average response. The null requires all \(G-1\) differences to be zero. Other full-rank group-contrast bases, such as orthogonal contrasts, are equally valid; the tested hypothesis is unchanged.

Worked Example: Contrasts of Three Group Profiles

Suppose the rows of the population mean matrix are $$ M= \begin{pmatrix} 10&12&14&16\\ 12&13&14&15\\ 9&11&15&17 \end{pmatrix}. $$ There are three groups and four occasions. Find the group-average responses and the two contrasts using group 1 as the reference.

The occasion-average vector is \(c=(1/4,1/4,1/4,1/4)'\). Averaging each row gives $$ Mc= \begin{pmatrix} (10+12+14+16)/4\\ (12+13+14+15)/4\\ (9+11+15+17)/4 \end{pmatrix} = \begin{pmatrix} 13\\13.5\\13 \end{pmatrix}. $$

Choose \(A=\begin{pmatrix}-1&1&0\\-1&0&1\end{pmatrix}\). Then $$ AMc= \begin{pmatrix} -13+13.5\\ -13+13 \end{pmatrix} = \begin{pmatrix} 0.5\\0 \end{pmatrix}. $$ The first and third groups have the same average response, but the second group's average is \(0.5\) higher. The equal-levels hypothesis is therefore false for these specified population means.

Equal Levels Is Not Equality at Every Occasion

Equality of averages is one scalar summary per group. Equality at every occasion is a stronger requirement: it says that the group mean profiles are identical, not merely that their averages agree. The distinction can be made precise. Equality at every occasion implies equal levels, since averaging equal entries preserves equality. The reverse implication does not hold in general.

Worked Example: Equal Averages but Different Profiles

Consider two population mean profiles over three occasions: $$ \mu_1=(2,4,6),\qquad \mu_2=(4,4,4). $$ Their average levels are $$ \frac{2+4+6}{3}=4,\qquad \frac{4+4+4}{3}=4. $$ Thus the equal-levels hypothesis holds. But the occasion-specific means differ: at the first occasion they are 2 and 4, and at the third they are 6 and 4. Equality at every occasion does not hold.

This example also shows why averaging can conceal a pattern: the first profile rises while the second is constant, yet their averages coincide. A test of equal levels alone cannot be interpreted as evidence that the group means match on each occasion.

There is a useful connection with profile parallelism. If profiles are parallel in the usual sense that each difference between two group profiles is constant across occasions, then equality of their averages forces that constant difference to be zero. In that case, parallelism together with equal levels implies equality of the profiles at every occasion. Without the parallelism condition, equal levels alone does not have that implication.

An Exact Test Using Subject-Level Averages

For subject \(i\) in group \(g\), let \(Y_{gi}\) be the \(p\)-vector of responses across occasions, and form the subject-level average \(Z_{gi}=c'Y_{gi}\). Its population mean is \(c'\mu_g\), the average level for group \(g\). Consequently, testing equality of profile levels is equivalent to testing equality of the group means of these subject-level averages.

An exact pooled one-way \(F\) test is available under a specific model. Assume the subject vectors are independent; within group \(g\), \(Y_{gi}\sim N_p(\mu_g,\Sigma)\); and the same positive-definite covariance matrix \(\Sigma\) applies to every group. Let each group have a positive sample size \(n_g\), let \(N=\sum_{g=1}^G n_g\), and require \(G\ge 2\) and \(N>G\). Positive definiteness ensures that \(\tau^2=c'\Sigma c>0\). These assumptions imply that the \(Z_{gi}\) are independent normal observations with group means \(c'\mu_g\) and a common variance \(\tau^2\).

Theorem: Under the independent multivariate normal model with common positive-definite \(\Sigma\), positive group sizes, \(G\ge2\), and \(N>G\), the statistic $$ F=\frac{SS_B/(G-1)}{SS_W/(N-G)} $$ has an \(F_{G-1,N-G}\) distribution under the equal-profile-levels null. Here \(\bar Z_g=n_g^{-1}\sum_{i=1}^{n_g}Z_{gi}\), \(\bar Z=N^{-1}\sum_g n_g\bar Z_g\), $$ SS_B=\sum_{g=1}^G n_g(\bar Z_g-\bar Z)^2,\qquad SS_W=\sum_{g=1}^G\sum_{i=1}^{n_g}(Z_{gi}-\bar Z_g)^2. $$

Proof. Since \(Z_{gi}=c'Y_{gi}\), linear transformation of a multivariate normal vector gives \(Z_{gi}\sim N(c'\mu_g,\tau^2)\), with \(\tau^2=c'\Sigma c>0\). Independence of the subject vectors gives independence of all the \(Z_{gi}\). Under the null, their group means are equal, so the vector of all \(N\) scalar observations has a common mean and covariance matrix \(\tau^2 I_N\).

Let \(P\) be the orthogonal projection onto the subspace of vectors that are constant within each group. This subspace has dimension \(G\). Let \(P_0\) project onto the one-dimensional space of constant vectors. Because the constant vector belongs to the group-constant subspace, \(P-P_0\) is an orthogonal projection of rank \(G-1\). The projection \(I_N-P\) has rank \(N-G\), and its range is orthogonal to the range of \(P-P_0\). The corresponding centered sums of squares are $$ SS_B=Z'(P-P_0)Z,\qquad SS_W=Z'(I_N-P)Z, $$ where \(Z\) is the vector of all subject averages. Under the null, the common-mean component is annihilated by both projections. By the normal quadratic-form result for an orthogonal projection, the two sums divided by \(\tau^2\) are independent chi-square variables with \(G-1\) and \(N-G\) degrees of freedom. Dividing each by its degrees of freedom and taking their ratio gives the stated central \(F\) distribution. The conditions \(G\ge2\) and \(N>G\) ensure both degrees of freedom are positive. \(\square\)

The common covariance assumption permits arbitrary covariance among occasions; independence across occasions is not required. In particular, the variance of each subject average is \(c'\Sigma c\), which includes the covariance terms among occasions. The pooled test is exact because these scalar variances are equal across groups and the subject averages are normal.

Worked Example: Calculating the Pooled F Statistic

Suppose there are three groups, each with three subjects. The observed subject-level averages across occasions are:

  • Group 1: \(3,4,5\)
  • Group 2: \(4,5,6\)
  • Group 3: \(5,6,7\)

The group means are \(\bar Z_1=4\), \(\bar Z_2=5\), and \(\bar Z_3=6\), so the grand mean is \(\bar Z=(4+5+6)/3=5\). The between-groups sum of squares is $$ SS_B=3(4-5)^2+3(5-5)^2+3(6-5)^2=3+0+3=6. $$

Within group 1 the squared deviations sum to \((3-4)^2+(4-4)^2+(5-4)^2=2\). The same calculation gives 2 in each of groups 2 and 3, so \(SS_W=2+2+2=6\). Here \(G=3\) and \(N=9\), so the degrees of freedom are \(G-1=2\) and \(N-G=6\), both positive. Therefore $$ F=\frac{6/2}{6/6}=\frac{3}{1}=3. $$

Under the exact-test assumptions, this statistic is compared with an \(F_{2,6}\) reference distribution. The calculation tests equality of the population means of the subject-level occasion averages; it does not test equality of group means separately at each occasion.

Common Mistakes and Practical Interpretation

  • Replacing equal levels with equality at every occasion. Equal averages require only \(AMc=\mathbf{0}\). Equality at every occasion requires the group profiles themselves to match, a stronger condition.
  • Assuming an average-level test establishes parallelism. Two profiles can have the same average and still differ in their occasion pattern. Parallelism is a separate hypothesis.
  • Ignoring how level is defined. The contrast \(c\) assigns equal weight to each occasion. If a scientific question calls for different weights, those weights must be specified, and the tested level is then the corresponding weighted average.
  • Using a pooled \(F\) statistic without valid degrees of freedom. Positive group sizes alone are insufficient. The exact statistic above requires at least two groups and \(N>G\), so both \(G-1\) and \(N-G\) are positive.
  • Assuming occasions must be independent. The exact scalar test allows within-subject covariance. What it requires is a common, positive variance for the subject-level averages, together with the stated normality and independence conditions.

Equal profile levels are useful when the scientific question concerns an overall response magnitude averaged across occasions. The contrast form makes the target explicit, while the distinction from occasion-by-occasion equality prevents an overall summary from being overinterpreted.

Check Your Understanding

Use the definitions and results above to answer these questions.

  1. For four groups and three occasions, what dimensions should \(A\) and \(c\) have in \(AMc\)?
  2. Can two groups satisfy equal profile levels while having different population means at one or more occasions? Explain briefly.
  3. Why does the pooled test allow covariance among repeated occasions, and what variance must be common across groups?
  4. For \(G=4\) groups and \(N=4\) subjects in total, is the pooled \(F\) statistic defined with positive denominator degrees of freedom? Explain.
  5. If profiles are parallel and have equal average levels, what follows about their occasion-specific population means?
Clinical Biostats