Class: RepeatedMeasuresModel

Epsilon adjustment for repeated measures anova


  • tbl = epsilon(rm) example
  • tbl = epsilon(rm,C)



tbl = epsilon(rm) returns the epsilon adjustment factors for repeated measures model rm.

tbl = epsilon(rm,C) returns the epsilon adjustment factors for the test based on the contrast matrix C.


  • The mauchly method tests for sphericity.

  • The ranova method contains p-values based on each epsilon value.

Input Arguments

collapse all

rm — Repeated measures modelRepeatedMeasuresModel object

Repeated measures model, returned as a RepeatedMeasuresModel object.

For properties and methods of this object, see RepeatedMeasuresModel.

C — Contrastsmatrix

Contrasts, specified as a matrix. The default value of C is the Q factor in a QR decomposition of the matrix M, where M is defined so that Y*M is the difference between all successive pairs of columns of the repeated measures matrix Y.

Data Types: single | double

Output Arguments

collapse all

tbl — Epsilon adjustment factorstable

Epsilon adjustment factors for the repeated measures model rm, returned as a table. tbl contains four different adjustments for epsilon.

UncorrectedNo adjustments, epsilon = 1
Greenhouse-GeiserGreenhouse-Geiser approximation
Huynh-FeldtHuynh-Feldt approximation
Lower boundLower bound on the p-value

For details, see Compound Symmetry Assumption and Epsilon Corrections.

Data Types: table


collapse all

Epsilon Corrections for Repeated Measures ANOVA

Load the sample data.

load fisheriris

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.

t = table(species,meas(:,1),meas(:,2),meas(:,3),meas(:,4),...
Meas = dataset([1 2 3 4]','VarNames',{'Measurements'});

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

rm = fitrm(t,'meas1-meas4~species','WithinDesign',Meas);

Perform repeated measures analysis of variance.

ranovatbl = ranova(rm)
ranovatbl = 

                            SumSq     DF      MeanSq       F         pValue       pValueGG    pValueHF    pValueLB
                            ______    ___    ________    ______    ___________    ________    ________    ________

    Measurements            1656.3      3      552.09    6873.3              0      0           0           0     
    species:Measurements    282.47      6      47.078     586.1    1.4271e-206      0           0           0     
    Error                   35.423    441    0.080324                                                             

ranova computes the last three p-values using Greenhouse-Geisser, Huynh-Feldt, and lower bound corrections, respectively.

Display the epsilon correction values.

ans = 


    Uncorrected                 1
    Greenhouse-Geisser    0.75179
    Huynh-Feldt           0.77448
    Lower bound           0.33333                              

You can check the compound symmetry (sphericity) assumption using the mauchly method.


ranova computes the regular p-value (in the pValue column of the rmanova table) using the F-statistic cumulative distribution function:

p-value = 1 – fcdf(F,v1,v2).

When the compound symmetry assumption is not satisfied, ranova uses a correction factor epsilon, ε, to compute the corrected p-values as follows:

p-value_corrected = 1 – fcdf(F,ε*v1,ε*v2).

The epsilon method returns the epsilon adjustment values.

Was this topic helpful?