Computes 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.
epsilon_corrections(x, id = NULL, time = NULL, outcome = NULL)A data.frame with columns epsilon_method
("Greenhouse-Geisser", "Huynh-Feldt", "lower_bound")
and epsilon (the correction factor in \([1/(k-1), 1]\)).
Either an \(n \times k\) numeric matrix or
data.frame (rows = subjects, columns = repeated measurements);
or a long-format data.frame together with id,
time, and outcome column names.
Column name in x identifying the subject when x is in long format (NULL otherwise).
Column name in x identifying the within-subjects factor level when x is in long format (NULL otherwise).
Column name in x identifying the dependent variable when x is in long format (NULL otherwise).
Ken Kelley [email protected]
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.
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.
mauchly_test, anova_within
Other within-subjects analysis:
anova_within(),
anova_within_two_way(),
mauchly_test(),
pairwise_within(),
plot_trajectories_fitted()
set.seed(113)
Y <- matrix(rnorm(20 * 4), nrow = 20)
epsilon_corrections(Y)
Run the code above in your browser using DataLab