From a Study Design to Profile Hypotheses
A repeated-measures profile study records the same outcome for each participant at several ordered occasions. Its analysis must distinguish changes across occasions from differences between groups in those changes. A test of an overall group difference does not answer either question: the occasion pattern is the target.
This worked analysis uses two independent groups measured at three occasions. We represent occasion effects with contrasts, so the common profile level is separated from its changes. We then use the same contrast coordinates to examine sphericity, obtain a corrected univariate test, and calculate multivariate tests. The tests rely on independent participants, complete observations, multivariate normal contrast scores, and a common within-group covariance matrix.
The first null hypothesis concerns the overall occasion pattern: the appropriately weighted average of the group profiles is flat. The second concerns whether the groups have the same pattern. In a balanced two-group study, these are \(H_0:C(\boldsymbol{\mu}_1+\boldsymbol{\mu}_2)/2=\mathbf{0}\) and \(H_0:C(\boldsymbol{\mu}_2-\boldsymbol{\mu}_1)=\mathbf{0}\), respectively. Rejecting the first indicates an average occasion effect; rejecting the second indicates a group-by-occasion interaction.
Worked Study and Contrast Coordinates
Use the orthonormal contrast matrix
Its first row measures a linear change from the first to the third occasion, and its second measures curvature. The rows sum to zero, have unit length, and are orthogonal. For participant \(i\), write \(Z_i=CY_i\), where \(Y_i\) is the three-occasion response vector. The common profile level is removed by this transformation; the two entries of \(Z_i\) retain the occasion contrasts.
Worked Example: Specifying the Study and Its Hypotheses
There are four participants in each of two groups, measured at all three occasions. To make the full profiles explicit, define each profile as \(Y_i=10\mathbf{1}+C^\mathsf{T}Z_i\). The contrast scores in Group 1 are \((-\sqrt{6},0),(\sqrt{6},0),(0,-\sqrt{3/2}),(0,\sqrt{3/2})\). The Group 2 scores are these same four residual vectors, each added to \((2,1)\).
Thus the group contrast means are \(\bar Z_1=(0,0)\) and \(\bar Z_2=(2,1)\), and the equally weighted overall contrast mean is \(\bar Z=(1,1/2)\). The occasion-effect null is \(H_0:\bar Z=(0,0)\); the interaction null is \(H_0:\bar Z_2-\bar Z_1=(0,0)\). In this constructed data, the overall profile is not flat and the group profiles differ. Whether either departure is large relative to participant-to-participant variation requires an inferential test.
For either group, the first contrast-score coordinate has sample variance \((6+6)/3=4\), and the second has sample variance \((3/2+3/2)/3=1\). Their cross-product sum is zero, so their sample covariance is zero. Consequently, each group’s contrast covariance, and hence the pooled within-group estimate, is \(S=\begin{pmatrix}4&0\\0&1\end{pmatrix}\). The residual degrees of freedom are \(\nu=8-2=6\).
The specification \(Y_i=10\mathbf{1}+C^\mathsf{T}Z_i\) also confirms that these are complete three-occasion profiles. For example, the Group 2 mean profile is \(10\mathbf{1}+C^\mathsf{T}(2,1)^\mathsf{T}\), approximately \((8.994,9.184,11.822)\). The common level of 10 does not affect any of the contrast tests.
Sphericity and the Univariate Analysis
For \(q\) orthonormal contrast coordinates, sphericity means that their covariance matrix is a scalar multiple of the identity: \(\operatorname{Cov}(Z_i)=\sigma^2 I_q\). In this study, the estimated contrast covariance has eigenvalues 4 and 1, rather than two equal values. This is evidence against sphericity in the sample; it does not by itself establish the population covariance structure, especially with only eight participants.
The Greenhouse–Geisser estimate summarizes how far the estimated covariance departs from sphericity. For a positive-semidefinite contrast covariance estimate \(S\), \(\hat\epsilon_{\mathrm{GG}}=\{\operatorname{tr}(S)\}^2/[q\operatorname{tr}(S^2)]\). It adjusts the univariate test’s degrees of freedom, not its observed \(F\)-statistic.
To verify the bounds, let \(\lambda_1,\ldots,\lambda_q\) be the nonnegative eigenvalues of \(S\). Then \(\operatorname{tr}(S)=\sum_j\lambda_j\) and \(\operatorname{tr}(S^2)=\sum_j\lambda_j^2>0\). The inequality \((\sum_j\lambda_j)^2\geq\sum_j\lambda_j^2\) gives the lower bound after division by \(q\sum_j\lambda_j^2\). Cauchy–Schwarz gives \((\sum_j\lambda_j)^2\leq q\sum_j\lambda_j^2\), giving the upper bound. Equality in this last inequality requires all eigenvalues to be equal. \(\square\)
Worked Example: Estimating Sphericity and Correcting Degrees of Freedom
Here \(q=2\), \(S=\operatorname{diag}(4,1)\), \(\operatorname{tr}(S)=5\), and \(\operatorname{tr}(S^2)=16+1=17\). Therefore \(\hat\epsilon_{\mathrm{GG}}=25/(2\cdot17)=25/34\approx0.7353\). This lies between the lower bound \(1/2\) and upper bound 1, and is below 1 because the two estimated contrast variances differ.
The uncorrected within-subject numerator and denominator degrees of freedom are \(q=2\) and \(q\nu=12\). The Greenhouse–Geisser corrected degrees of freedom are therefore \(2(25/34)=50/34\approx1.471\) and \(12(25/34)=300/34\approx8.824\). The observed \(F\) remains unchanged; its reference distribution uses these adjusted degrees of freedom.
The univariate sums of squares can be derived directly in contrast coordinates. The fitted overall occasion effect has contrast mean \(\bar Z\), so its sum of squares is \(SS_{\text{time}}=N\bar Z^\mathsf{T}\bar Z\) in this balanced design. For the interaction, let \(D=\bar Z_2-\bar Z_1\). The group deviations from the grand mean are \(-D/2\) and \(D/2\), giving \(SS_{\text{interaction}}=n_1\|D/2\|^2+n_2\|D/2\|^2\). The pooled residual sum of squares is \((N-g)\operatorname{tr}(S)\), where \(g\) is the number of groups. Dividing each effect sum of squares by \(q\), and the residual sum of squares by \(q\nu\), gives the univariate \(F\)-statistic.
Worked Example: Calculating the Corrected Univariate Tests
For the overall occasion effect, \(N=8\) and \(\bar Z=(1,1/2)\), so \(SS_{\text{time}}=8(1^2+(1/2)^2)=8(5/4)=10\). For the interaction, \(D=(2,1)\), so \(SS_{\text{interaction}}=4(1^2+1/2^2)+4(1^2+1/2^2)=10\). The residual sum of squares is \((8-2)\operatorname{tr}(S)=6(4+1)=30\).
For either effect, the uncorrected statistic is \((10/2)/(30/12)=5/2.5=2.00\), with uncorrected degrees of freedom \((2,12)\). The Greenhouse–Geisser analysis reports \(F=2.00\) with degrees of freedom approximately \((1.471,8.824)\). The correction makes the reference distribution account for the estimated departure from sphericity; it does not change the effect sum of squares or the residual sum of squares.
Multivariate Tests and Their Interpretation
A multivariate analysis tests the vector of contrast means without requiring sphericity. It does require an appropriate multivariate model; here we assume independent multivariate-normal contrast scores and a common within-group covariance matrix. For a \(q\)-dimensional contrast mean tested using residual covariance \(S\) with \(\nu\) residual degrees of freedom, define the squared Mahalanobis distance using \(S^{-1}\). Hotelling’s \(T^2\) transformation for a one-vector hypothesis is \(F=(\nu-q+1)T^2/(q\nu)\), with degrees of freedom \((q,\nu-q+1)\), when \(S\) is the usual pooled residual covariance estimate and \(\nu\geq q\).
Worked Example: Testing Time and Interaction Multivariately
For the overall occasion effect, the contrast mean is \(\bar Z=(1,1/2)\). Its squared distance is \(\bar Z^\mathsf{T}S^{-1}\bar Z=1^2/4+(1/2)^2/1=1/4+1/4=1/2\). Because the study is balanced, the grand contrast mean has multiplier \(N=8\), so \(T^2_{\text{time}}=8(1/2)=4\).
For the interaction, \(D=(2,1)\) and \(D^\mathsf{T}S^{-1}D=2^2/4+1^2/1=2\). The two-sample multiplier is \(n_1n_2/(n_1+n_2)=4\cdot4/8=2\), so \(T^2_{\text{interaction}}=2(2)=4\). In both tests, \(q=2\) and \(\nu=6\), giving \(F=(6-2+1)/(2\cdot6)\times4=5/3\approx1.667\), with degrees of freedom \((2,5)\). The corresponding upper-tail probability is \((5/(5+2(5/3)))^{5/2}=(3/5)^{5/2}\approx0.279\).
At the 0.05 level, neither multivariate test is significant. The corrected univariate statistics are also \(F=2.00\), but use the Greenhouse–Geisser-adjusted degrees of freedom. Report the test type, degrees of freedom, statistic, and p-value from the corresponding reference distribution; do not transfer a p-value from one analysis to the other.
These calculations illustrate why the two approaches are complementary. The multivariate tests avoid a sphericity assumption but use the covariance matrix to assess a vector-valued effect, and their power can be limited when the sample is small relative to the number of contrasts. The corrected univariate analysis retains a univariate \(F\)-statistic and adjusts its degrees of freedom to account for estimated nonsphericity. Neither method makes a small sample’s covariance estimate precise.
Common Pitfall and Reporting
Common mistake: treating an occasion effect as if it were tested by comparing the groups’ overall response averages, or reporting the uncorrected univariate degrees of freedom because the observed \(F\) is unchanged by Greenhouse–Geisser. Neither is correct. The occasion effect concerns contrast means, not the common profile level; and the correction changes the reference distribution even though it leaves the statistic unchanged.
A clear report names the contrast hypothesis, method, statistic, degrees of freedom, and p-value. For this example, one could report that the multivariate test of the average occasion effect was \(F(2,5)=1.67\), \(p\approx.279\), and the multivariate group-by-occasion test was also \(F(2,5)=1.67\), \(p\approx.279\). The corrected univariate analyses had \(F=2.00\), with Greenhouse–Geisser degrees of freedom approximately \((1.47,8.82)\) for each effect; their p-values should be obtained from that corrected \(F\) distribution.
Check Your Understanding
Use the study and calculations above to answer these questions.
- What null hypothesis does \(C(\boldsymbol{\mu}_2-\boldsymbol{\mu}_1)=\mathbf{0}\) represent in this study?
- Why does the estimate \(S=\operatorname{diag}(4,1)\) fail to satisfy sphericity in the chosen orthonormal contrast coordinates?
- What happens to the observed univariate \(F\)-statistic, and what happens to its degrees of freedom, under the Greenhouse–Geisser correction?
- Why are the contrast mean and not the common profile level used to test an occasion effect?
- State two assumptions used for the multivariate tests in this worked analysis.