The regular *p*-value calculations in the repeated
measures anova (`ranova`

) are accurate if the theoretical
distribution of the response variables have compound symmetry. This
means that all response variables have the same variance, and each
pair of response variables share a common correlation. That is,

$$\Sigma ={\sigma}^{2}\left(\begin{array}{cccc}1& \rho & \cdots & \rho \\ \rho & 1& \cdots & \rho \\ \vdots & \vdots & \ddots & \vdots \\ \rho & \rho & \cdots & 1\end{array}\right).$$

If the compound symmetry assumption is false, then the degrees
of freedom for the repeated measures anova test must be adjusted by
a factor ε, and the *p*-value must be computed
using the adjusted values.

Compound symmetry implies sphericity.

For a repeated measures model with responses *y*1, *y*2,
..., sphericity means that all pair-wise differences *y*1
– *y*2, *y*1 – *y*3,
... have the same theoretical variance. Mauchly's test is the
most accepted test for sphericity.

Mauchly's *W* statistic is

$$W=\frac{\left|T\right|}{{\left(trace\left(T\right)/p\right)}^{d}},$$

where

$$T=M\text{'}\widehat{\sum}M.$$

*M* is a *p*-by-*d* orthogonal
contrast matrix, Σ is the covariance matrix, *p* is
the number of variables, and *d* = *p* –
1.

A chi-square test statistic assesses the significance of *W*.
If *n* is the number of rows in the design matrix,
and *r* is the rank of the design matrix, then the
chi-square statistic is

$$C=-\left(n-r\right)\mathrm{log}\left(W\right)D,$$

where

$$D=1-\frac{2{d}^{2}+d+2}{6d\left(n-r\right)}.$$

The *C* test statistic has a chi-square distribution
with (*p*(*p* – 1)/2) –
1 degrees of freedom. A small *p*-value for the Mauchly's
test indicates that the sphericity assumption does not hold.

The `rmanova`

method computes the *p*-values
for the repeated measures anova based on the results of the Mauchly's
test and each epsilon value.

[1] Mauchly, J. W. "Significance Test for Sphericity
of a Normal *n*-Variate Distribution. *The
Annals of Mathematical Statistics.* Vol. 11, 1940, pp.
204–209.

Was this topic helpful?