Tutorials › Multivariate Statistics (Graduate) › Greenhouse-Geisser Epsilon

Contrasts and Repeated Measures · Tutorial 374 of 975

Greenhouse-Geisser Epsilon

Learn to calculate Greenhouse–Geisser epsilon from contrast covariance, understand what its bounds mean, and avoid errors caused by nonorthonormal contrast coordinates.

Advanced 10 min read

What You'll Learn

  • Define Greenhouse–Geisser epsilon using the trace and squared trace of contrast covariance
  • Relate contrast-coordinate traces to the centered occasion covariance matrix
  • Prove the lower and upper bounds and identify their equality conditions
  • Calculate epsilon for explicit spherical and nonspherical covariance structures
  • Explain why arbitrary nonorthogonal changes of contrast coordinates can give a misleading value

Why Summarize Contrast Covariance?

With repeated measurements, the covariance among occasions affects inference about within-subject effects. Sphericity is the condition that the covariance is spherical in the within-subject contrast space. When the covariance is not spherical, a single scalar can summarize how far its contrast-coordinate eigenvalues are from being equal: the Greenhouse–Geisser epsilon. It is a property of the contrast covariance, not of the observed sample alone.

The key is to calculate epsilon in an orthonormal basis for the contrast space. This makes the trace formula invariant to a change of orthonormal basis and gives the familiar range from the reciprocal of the contrast-space dimension to one.

Definition in Orthonormal Contrast Coordinates

Suppose there are \(m\) repeated occasions, and let \(Y\) be the \(m\)-dimensional random vector of measurements, with covariance matrix \(\Sigma=\operatorname{Cov}(Y)\). Set \(d=m-1\). Let \(C\) be a \(d\times m\) matrix whose rows form an orthonormal basis for the contrasts among occasions. Thus \(CC'=I_d\) and \(C\mathbf{1}=0\), where \(\mathbf{1}\) is the \(m\)-vector of ones. The contrast response is \(Z=CY\), and its covariance matrix is

$$ S=\operatorname{Cov}(Z)=C\Sigma C'. $$

Assume \(S\) is nonzero and positive semidefinite. In the usual nondegenerate case, \(\Sigma\) is positive definite, so \(S\) is positive definite as well.

Definition: For \(d=m-1\) within-subject contrasts with covariance matrix \(S\), the Greenhouse–Geisser epsilon is $$ \epsilon_{\mathrm{GG}}=\frac{\{\operatorname{tr}(S)\}^2}{d\,\operatorname{tr}(S^2)}. $$ Here \(\operatorname{tr}(S^2)\) is the trace of the matrix product \(SS\), not the square of \(\operatorname{tr}(S)\).

The formula compares the squared total contrast variance, \(\{\operatorname{tr}(S)\}^2\), with the sum of squared eigenvalues, \( \operatorname{tr}(S^2)\). Multiplying every contrast by the same nonzero constant multiplies the numerator and denominator by the same fourth-power factor, so epsilon is unchanged. A change to a different orthonormal contrast basis also leaves it unchanged.

Trace Formula and Basis Invariance

Define the centering projection \(P=I_m-\mathbf{1}\mathbf{1}'/m\), which projects onto the subspace of contrasts. Because the rows of \(C\) are an orthonormal basis of that subspace, \(C'C=P\). The trace formula can therefore also be written directly in terms of the occasion covariance matrix.

Result: For any orthonormal contrast basis \(C\), $$ \operatorname{tr}(S)=\operatorname{tr}(P\Sigma), \qquad \operatorname{tr}(S^2)=\operatorname{tr}(P\Sigma P\Sigma). $$ Consequently, $$ \epsilon_{\mathrm{GG}} =\frac{\{\operatorname{tr}(P\Sigma)\}^2} {d\,\operatorname{tr}(P\Sigma P\Sigma)}. $$

To verify the first identity, use \(S=C\Sigma C'\) and the cyclic property of the trace:

$$ \operatorname{tr}(S) =\operatorname{tr}(C\Sigma C') =\operatorname{tr}(C'C\Sigma) =\operatorname{tr}(P\Sigma). $$

For the second identity, insert \(C'C=P\) between the two covariance factors, then cycle the trace:

$$ \begin{aligned} \operatorname{tr}(S^2) &=\operatorname{tr}(C\Sigma C'C\Sigma C')\\ &=\operatorname{tr}(C\Sigma P\Sigma C')\\ &=\operatorname{tr}(C'C\Sigma P\Sigma)\\ &=\operatorname{tr}(P\Sigma P\Sigma). \end{aligned} $$

If \(\widetilde C=QC\) for an orthogonal \(d\times d\) matrix \(Q\), then \(\widetilde C\) is another orthonormal contrast basis and its covariance is \(\widetilde S=QSQ'\). The trace is unchanged under this orthogonal conjugation: \(\operatorname{tr}(\widetilde S)=\operatorname{tr}(S)\), and \(\operatorname{tr}(\widetilde S^2)=\operatorname{tr}(QS^2Q')=\operatorname{tr}(S^2)\). Thus the definition does not depend on which orthonormal contrast basis is used.

Worked Example: Calculating Epsilon for Three Occasions

Suppose the three occasion measurements have covariance matrix \(\Sigma=\operatorname{diag}(1,2,4)\). Use the orthonormal contrast matrix with rows \(c_1=(1,-1,0)/\sqrt{2}\) and \(c_2=(1,1,-2)/\sqrt{6}\). Here \(d=2\).

The first contrast variance is

$$ c_1\Sigma c_1' =\frac{1}{2}(1+2) =\frac{3}{2}. $$

The second contrast variance and their covariance are

$$ c_2\Sigma c_2' =\frac{1+2+16}{6} =\frac{19}{6}, \qquad c_1\Sigma c_2' =\frac{1-2}{\sqrt{12}} =-\frac{1}{2\sqrt{3}}. $$

Therefore the contrast covariance matrix is

$$ S= \begin{pmatrix} 3/2 & -1/(2\sqrt{3})\\ -1/(2\sqrt{3}) & 19/6 \end{pmatrix}. $$

Its trace is \(3/2+19/6=14/3\). For a symmetric two-by-two matrix with diagonal entries \(a,c\) and off-diagonal entry \(b\), the trace of its square is \(a^2+c^2+2b^2\). Hence

$$ \operatorname{tr}(S^2) =\frac{9}{4}+\frac{361}{36}+\frac{2}{12} =\frac{112}{9}. $$

Substituting into the definition gives

$$ \epsilon_{\mathrm{GG}} =\frac{(14/3)^2}{2(112/9)} =\frac{196}{224} =\frac{7}{8}. $$

The result lies between \(1/2\) and \(1\), the bounds for a two-dimensional contrast space.

Bounds and Equality Conditions

The bounds follow from the eigenvalues of the contrast covariance. Since \(S\) is symmetric and positive semidefinite, it has real eigenvalues \(\lambda_1,\ldots,\lambda_d\), all nonnegative. Its trace is their sum, and the trace of its square is the sum of their squares.

Theorem: If \(S\) is a nonzero positive semidefinite \(d\times d\) contrast covariance matrix, then $$ \frac{1}{d}\leq \epsilon_{\mathrm{GG}}\leq 1. $$ The upper equality holds exactly when all eigenvalues of \(S\) are equal. The lower equality holds exactly when at most one eigenvalue is nonzero. If \(S\) is positive definite and \(d>1\), then the lower inequality is strict.

Proof. Write \(t=\sum_{i=1}^d\lambda_i\). Since \(S\) is nonzero and positive semidefinite, \(t>0\) and \(\sum_i\lambda_i^2>0\). By the Cauchy–Schwarz inequality,

$$ \left(\sum_{i=1}^d\lambda_i\right)^2 \leq d\sum_{i=1}^d\lambda_i^2. $$

Dividing by \(d\sum_i\lambda_i^2\) gives \(\epsilon_{\mathrm{GG}}\leq 1\). Equality in Cauchy–Schwarz holds exactly when the eigenvalues are all equal. For the other bound, nonnegativity gives

$$ \left(\sum_{i=1}^d\lambda_i\right)^2 =\sum_{i=1}^d\lambda_i^2 +2\sum_{i<j}\lambda_i\lambda_j \geq \sum_{i=1}^d\lambda_i^2. $$

Dividing by \(d\sum_i\lambda_i^2\) gives \(\epsilon_{\mathrm{GG}}\geq 1/d\). Equality requires every product \(\lambda_i\lambda_j\), for \(i<j\), to be zero, so at most one eigenvalue can be nonzero. If \(S\) is positive definite and \(d>1\), all eigenvalues are positive, making at least one product positive; the lower inequality is then strict. \(\square\)

The upper equality condition is precisely equal variance in every orthonormal contrast direction, which is sphericity in contrast coordinates. The lower equality is a boundary case: all contrast variability is concentrated in at most one direction. For a positive-definite contrast covariance with more than one contrast, epsilon approaches but does not attain that lower bound.

Worked Example: Spherical Contrast Covariance

Suppose there are four occasions and the occasion covariance is \(\Sigma=I_4\). For any orthonormal contrast matrix \(C\), the contrast covariance is

$$ S=C I_4 C'=CC'=I_3. $$

Thus \(d=3\), \(\operatorname{tr}(S)=3\), and \(\operatorname{tr}(S^2)=3\). Therefore

$$ \epsilon_{\mathrm{GG}}=\frac{3^2}{3(3)}=1. $$

All three contrast directions have the same variance, so this example attains the upper bound.

Worked Example: Unequal Contrast Variances

For four occasions, let the covariance in an orthonormal contrast basis be \(S=\operatorname{diag}(4,1,1)\). This is positive definite. It can be completed to a positive-definite occasion covariance by taking \(\Sigma=C'SC+\mathbf{1}\mathbf{1}'/4\): the contrast subspace has covariance \(S\), while the remaining term supplies positive variance in the grand-mean direction.

Here \(d=3\), \(\operatorname{tr}(S)=4+1+1=6\), and \(\operatorname{tr}(S^2)=16+1+1=18\). Consequently,

$$ \epsilon_{\mathrm{GG}} =\frac{6^2}{3(18)} =\frac{36}{54} =\frac{2}{3}. $$

The largest contrast variance is four times either of the other two, so the eigenvalues are not equal and epsilon is below one. The calculation also confirms the three-dimensional lower bound \(1/3\leq 2/3\).

Common Pitfall: Using Nonorthonormal Coordinates

The trace formula is not invariant under an arbitrary nonsingular change of contrast coordinates. For example, begin with \(S=I_2\), for which epsilon is \(1\). If the coordinates are changed using \(A=\operatorname{diag}(2,1)\), the transformed covariance is \(ASA'=\operatorname{diag}(4,1)\). Applying the formula to this matrix as though it came from an orthonormal basis gives

$$ \frac{(4+1)^2}{2(4^2+1^2)} =\frac{25}{34}, $$

not \(1\). The error is treating the rescaled coordinates as orthonormal contrasts. To obtain the Greenhouse–Geisser epsilon, use an orthonormal contrast basis, or use the equivalent projection formula involving \(P\) and \(\Sigma\). This distinction matters even though the transformed coordinates span the same contrast space.

What Epsilon Summarizes

Epsilon measures the spread of contrast-covariance eigenvalues relative to their total. When they are equal, the covariance is spherical and epsilon is one. As the eigenvalues become more uneven, the sum of their squares becomes larger relative to the square of their sum, and epsilon decreases. Thus \(d\epsilon_{\mathrm{GG}}\) can be viewed as an effective number of equally variable contrast directions: it equals \(d\) under sphericity and is smaller when variability is concentrated in fewer directions.

The scalar is useful because it compresses a covariance structure into a single interpretable quantity while preserving the dependence on the contrast space. It does not identify which contrasts have high or low variance; distinct covariance matrices can have the same eigenvalue summary and hence the same epsilon. The full covariance matrix remains important when the direction of the departures from sphericity matters.

Check Your Understanding

Use the definition and bounds to answer the following questions.

  1. For \(d=4\), what are the lower and upper bounds for Greenhouse–Geisser epsilon?
  2. What condition on the eigenvalues of \(S\) makes epsilon equal to one?
  3. For eigenvalues \(3,1\) in a two-dimensional contrast space, calculate epsilon.
  4. Why can a nonorthogonal change of contrast coordinates alter the value obtained from the trace formula?
  5. If \(S\) is positive definite and \(d>1\), can epsilon equal \(1/d\)? Explain using the equality condition for the lower bound.
Clinical Biostats