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 repeated measures analysis of variance.
ranovatbl=3×8 table
SumSq DF MeanSq F pValue pValueGG pValueHF pValueLB
______ ___ ________ ______ ___________ ___________ ___________ ___________
(Intercept):Measurements 1656.3 3 552.09 6873.3 0 9.4491e-279 2.9213e-283 2.5871e-125
species:Measurements 282.47 6 47.078 586.1 1.4271e-206 4.9313e-156 1.5406e-158 9.0151e-71
Error(Measurements) 35.423 441 0.080324
ranova
computes the last three -values using Greenhouse-Geisser, Huynh-Feldt, and lower bound corrections, respectively.
Display the epsilon correction values.
ans=1×4 table
Uncorrected GreenhouseGeisser HuynhFeldt LowerBound
___________ _________________ __________ __________
1 0.75179 0.76409 0.33333
You can check the compound symmetry (sphericity) assumption using the mauchly
method.