Multivariate tests#

Multivariate procedures test vector-valued observations with \(I\) components at each domain point. These data are stored as (J, I) arrays for 0D data and as (J, Q, I) arrays for 1D data.

Results become unstable as the number of components \(I\) approaches the number of observations \(J\). The multivariate procedures are therefore suitable mainly when \(J\) is much larger than \(I\).

Hotelling’s T²#

The one-sample, paired and two-sample procedures: hotellings, hotellings_paired and hotellings2 use Hotelling’s T² statistic and are multivariate equivalents of ttest, ttest_paired and ttest2, respectively. When \(I\)=1, T² is equal to t².

Wilks’ \(\Lambda\) and Rao’s F#

MANOVA, MANCOVA and CCA procedures (manova1, manova2, manova3, mancova, cca) test each effect using Wilks’ \(\Lambda\):

\[\Lambda = \frac{|\mathbf{E}|}{|\mathbf{E} + \mathbf{H}|} = \prod_j \frac{1}{1 + \lambda_j}\]

where \(\mathbf{E}\) and \(\mathbf{H}\) are the error and hypothesis sums of squares and products matrices, and \(\lambda_j\) are the eigenvalues of \(\mathbf{E}^{-1}\mathbf{H}\).

spm1d reports \(\Lambda\) as Rao’s F. This F statistic has degrees of freedom \((I c, \nu_2)\), where \(c\) is the number of columns of the effect and \(\nu_2\) is calculated using Rao’s approximation. Results are printed as SPM{F} (Wilks' Λ). The value of \(\Lambda\) itself is available as fit.wilks.

In spm1d v0.4 \(\Lambda\) was converted to a χ² statistic via Bartlett’s approximation. Version 0.5 preferentially uses Rao’s F for consistency with other packages like R and statsmodels and also for improved false positive rate control. For an effect with one column (i.e., two groups), Rao’s F is equivalent to Hotelling’s T² expressed in F form and the two tests yield identical results.

Smoothness#

spm1d 0.5 estimates the smoothness of multivariate residuals using the multivariate Lipschitz–Killing curvature estimator of Taylor and Worsley (2008) as described in Smoothness estimation.

Post hoc tests#

Post hoc thresholds for multivariate tests are derived from the omnibus critical value as described in Post hoc tests.