Greenhouse-Geisser, Huynh-Feldt, and Lower-Bound Epsilon Corrections
Source:R/mauchly_test.R
epsilon_corrections.RdComputes the three standard sphericity-correction factors for the univariate within-subjects F test. When sphericity holds, all three equal 1; departures from sphericity reduce them, deflating the effective degrees of freedom and thus tempering the inflated Type I error rate of the unadjusted univariate test.
Arguments
- x
Either an \(n \times k\) numeric matrix or
data.frame(rows = subjects, columns = repeated measurements); or a long-formatdata.frametogether withid,time, andoutcomecolumn names.- id
Column name in
xidentifying the subject whenxis in long format (NULLotherwise).- time
Column name in
xidentifying the within-subjects factor level whenxis in long format (NULLotherwise).- outcome
Column name in
xidentifying the dependent variable whenxis in long format (NULLotherwise).
Value
A data.frame with columns epsilon_method
("Greenhouse-Geisser", "Huynh-Feldt", "lower_bound")
and epsilon (the correction factor in \([1/(k-1), 1]\)).
Details
For an \((k - 1) \times (k - 1)\) covariance matrix \(\hat\Sigma_C\) of orthonormal contrasts among the \(k\) repeated measurements (with eigenvalues \(\lambda_1, \ldots, \lambda_{k-1}\)): $$\hat\varepsilon_{\mathrm{GG}} = \frac{(\sum \lambda_i)^2}{(k - 1)\,\sum \lambda_i^2},$$ $$\hat\varepsilon_{\mathrm{HF}} = \min\!\Bigl(1,\ \frac{n(k - 1)\hat\varepsilon_{\mathrm{GG}} - 2}{(k - 1)\bigl(n - 1 - (k - 1)\hat\varepsilon_{\mathrm{GG}}\bigr)}\Bigr),$$ $$\hat\varepsilon_{\mathrm{LB}} = \frac{1}{k - 1}.$$ The Greenhouse-Geisser \(\hat\varepsilon\) tends to be conservative; the Huynh-Feldt correction adjusts upward to be (approximately) unbiased; the lower bound is the worst-case adjustment.
References
Greenhouse, S. W., & Geisser, S. (1959). On methods in the analysis of profile data. Psychometrika, 24(2), 95–112.
Huynh, H., & Feldt, L. S. (1976). Estimation of the Box correction for degrees of freedom from sample data in randomized block and split-plot designs. Journal of Educational Statistics, 1(1), 69–82.
Maxwell, S. E., Delaney, H. D., & Kelley, K. (2027). Designing experiments and analyzing data: A model comparison perspective (4th ed.). Routledge.
See also
Other within-subjects analysis:
anova_within(),
anova_within_two_way(),
mauchly_test(),
pairwise_within(),
plot_trajectories_fitted()
Author
Ken Kelley kkelley@nd.edu