Load the sample data.

The column vector `species`

consists of iris
flowers of three different species: setosa, versicolor, virginica.
The double matrix `meas`

consists of four types of
measurements on the flowers: the length and width of sepals and petals
in centimeters, respectively.

Store the data in a table array.

Fit a repeated measures model where the measurements are
the responses and the species is the predictor variable.

Perform multivariate analysis of variance.

ans =
Within Between Statistic Value F RSquare df1 df2 pValue
________ ___________ _________ _________ ______ _______ ___ ___ ___________
Constant (Intercept) Pillai 0.99013 4847.5 0.99013 3 145 3.7881e-145
Constant (Intercept) Wilks 0.0098724 4847.5 0.99013 3 145 3.7881e-145
Constant (Intercept) Hotelling 100.29 4847.5 0.99013 3 145 3.7881e-145
Constant (Intercept) Roy 100.29 4847.5 0.99013 3 145 3.7881e-145
Constant species Pillai 0.96909 45.749 0.48455 6 292 2.4729e-39
Constant species Wilks 0.041153 189.92 0.79714 6 290 2.3958e-97
Constant species Hotelling 23.051 555.17 0.92016 6 288 4.6662e-155
Constant species Roy 23.04 1121.3 0.9584 3 146 1.4771e-100

Perform multivariate anova separately for each species.

ans =
Within Between Statistic Value F RSquare df1 df2 pValue
________ __________________ _________ ________ ______ _______ ___ ___ ___________
Constant species=setosa Pillai 0.9823 2682.7 0.9823 3 145 9.0223e-127
Constant species=setosa Wilks 0.017698 2682.7 0.9823 3 145 9.0223e-127
Constant species=setosa Hotelling 55.504 2682.7 0.9823 3 145 9.0223e-127
Constant species=setosa Roy 55.504 2682.7 0.9823 3 145 9.0223e-127
Constant species=versicolor Pillai 0.97 1562.8 0.97 3 145 3.7058e-110
Constant species=versicolor Wilks 0.029999 1562.8 0.97 3 145 3.7058e-110
Constant species=versicolor Hotelling 32.334 1562.8 0.97 3 145 3.7058e-110
Constant species=versicolor Roy 32.334 1562.8 0.97 3 145 3.7058e-110
Constant species=virginica Pillai 0.97261 1716.1 0.97261 3 145 5.1113e-113
Constant species=virginica Wilks 0.027394 1716.1 0.97261 3 145 5.1113e-113
Constant species=virginica Hotelling 35.505 1716.1 0.97261 3 145 5.1113e-113
Constant species=virginica Roy 35.505 1716.1 0.97261 3 145 5.1113e-113

Load the sample data.

The column vector `species`

consists of iris
flowers of three different species: setosa, versicolor, virginica.
The double matrix `meas`

consists of four types of
measurements on the flowers: the length and width of sepals and petals
in centimeters, respectively.

Store the data in a table array.

Fit a repeated measures model where the measurements are
the responses and the species is the predictor variable.

Perform multivariate analysis of variance. Also return
the arrays for constructing the hypothesis test.

manovatbl =
Within Between Statistic Value F RSquare df1 df2 pValue
________ ___________ _________ _________ ______ _______ ___ ___ ___________
Constant (Intercept) Pillai 0.99013 4847.5 0.99013 3 145 3.7881e-145
Constant (Intercept) Wilks 0.0098724 4847.5 0.99013 3 145 3.7881e-145
Constant (Intercept) Hotelling 100.29 4847.5 0.99013 3 145 3.7881e-145
Constant (Intercept) Roy 100.29 4847.5 0.99013 3 145 3.7881e-145
Constant species Pillai 0.96909 45.749 0.48455 6 292 2.4729e-39
Constant species Wilks 0.041153 189.92 0.79714 6 290 2.3958e-97
Constant species Hotelling 23.051 555.17 0.92016 6 288 4.6662e-155
Constant species Roy 23.04 1121.3 0.9584 3 146 1.4771e-100
A =
[1x3 double]
[2x3 double]
C =
1 0 0
-1 1 0
0 -1 1
0 0 -1
D =
0

Index into matrix A.