## Multivariate Analysis of Variance for Repeated Measures

Multivariate analysis of variance analysis is a test of the form `A*B*C = D`, where `B` is the p-by-r matrix of coefficients. p is the number of terms, such as the constant, linear predictors, dummy variables for categorical predictors, and products and powers, r is the number of repeated measures, and n is the number of subjects. `A` is an a-by-p matrix, with rank ap, defining hypotheses based on the between-subjects model. `C` is an r-by-c matrix, with rank crn – p, defining hypotheses based on the within-subjects model, and `D` is an a-by-c matrix, containing the hypothesized value.

`manova` tests if the model terms are significant in their effect on the response by measuring how they contribute to the overall covariance. It includes all terms in the between-subjects model. `manova` always takes `D` as zero. The multivariate response for each observation (subject) is the vector of repeated measures.

`manova` uses four different methods to measure these contributions: Wilks’ lambda, Pillai’s trace, Hotelling-Lawley trace, Roy’s maximum root statistic. Define

`$\begin{array}{l}T=A\stackrel{^}{B}C-D,\\ Z=A{\left({X}^{\prime }X\right)}^{-1}{A}^{\prime }.\end{array}$`

Then, the hypotheses sum of squares and products matrix is

`${Q}_{h}={T}^{\prime }{Z}^{-1}T,$`

and the residuals sum of squares and products matrix is

`${Q}_{e}={C}^{\prime }\left({R}^{\prime }R\right)C,$`

where

`$R=Y-X\stackrel{^}{B}.$`

The matrix Qh is analogous to the numerator of a univariate F-test, and Qe is analogous to the error sum of squares. Hence, the four statistics `manova` uses are:

• Wilks’ lambda

`$\Lambda =\frac{|{Q}_{e}|}{|{Q}_{h}+{Q}_{e}|}=\prod \frac{1}{1+{\lambda }_{i}},$`

where λi are the solutions of the characteristic equation |QhλQe| = 0.

• Pillai’s trace

`$V=trace\left({Q}_{h}{\left({Q}_{h}+{Q}_{e}\right)}^{-1}\right)=\sum {\theta }_{i},$`

where θi values are the solutions of the characteristic equation Qhθ(Qh + Qe) = 0.

• Hotelling-Lawley trace

`$U=trace\left({Q}_{h}{Q}_{e}^{-1}\right)=\sum {\lambda }_{i}.$`

• Roy’s maximum root statistic

`$\Theta =\mathrm{max}\left(eig\left({Q}_{h}{Q}_{e}^{-1}\right)\right).$`

## References

[1] Charles, S. D. Statistical Methods for the Analysis of Repeated Measurements. Springer Texts in Statistics. Springer-Verlag, New York, Inc., 2002.