This Computational Provenance Record documents the statistical computing environment, software dependencies, computational provenance, and bibliographic references associated with the RAISINS Repeated-Measures One-Way ANOVA module. It is intended to support computational reproducibility and software transparency. Detailed statistical methodology, mathematical derivations, and user guidance are provided separately in the official module documentation.
Any issues or updates required please comment here
Fitted separately for each selected response as response ~ Day + Error(Subject/Day), where Day is the single within-subject (repeated) factor and Subject is the unit measured at every time point. There is no between-subject factor, so no interaction term
Sphericity test
Mauchly's test for the Day effect, reported for every response; sphericity is flagged as violated when p < α. Not reported when Day has only two levels (sphericity then holds automatically)
Sphericity correction
Default none; optional Greenhouse–Geisser (GG) or Huynh–Feldt (HF) correction of the numerator and denominator degrees of freedom. A Huynh–Feldt epsilon above 1 is set to 1
Effect size
Generalized eta-squared (es = "ges")
Multiple
Comparison
Test
Default LSD (adjust = "none"); TUKEY optional (adjust = "tukey"). Applied to the estimated marginal means of Day
Significance level α
Default 0.05; 0.01 optional
Letter Grouping
(multcomp::cld())
Method
cld(…, Letters = letters, adjust = test, alpha = α, decreasing = TRUE), so the letter a goes to the highest mean. Computed when Day has ≤ 30 levels
Display rule
Letters are shown only when the Dayp-value ≤ α; otherwise the grouping is left blank
Critical
Difference (CD)
LSD
qt(1 − α/2, df) × SE(d), computed for each pair
Tukey (HSD)
qtukey(1 − α, nmeans, df) × SE(d) / √2, computed for each pair
Residual
Normality
QQ plot tests
Residuals of lm(response ~ Day + Subject); Shapiro–Wilk by default (3 ≤ n ≤ 5000), Anderson–Darling and Kolmogorov–Smirnov optional
Transformation
Options
Log10 (shifted by −min + 1 when any value ≤ 0); square root (√(x + 0.5) when zeros are present); arcsine asin(√p) for proportions, with 0 and 1 replaced by 1/(4n) and 1 − 1/(4n)
Reporting
The analysis is run on the transformed values; the table shows original-scale means with transformed means in parentheses
PCA Index
Method
prcomp(center = TRUE, scale = TRUE) on the Day means of the selected responses (at least three); PC1 and PC2 scores rescaled to 0–1
Rounding
Displayed decimals
Controlled by the "Digits after decimal" input (default 2, range 1–4)
5 R Code for Key Analytical Steps
The code blocks below demonstrate the computation behind each reported result using the built-in Loblolly dataset from the datasets package. The height of each of 14 loblolly pine trees (Seed) was measured at the same six ages (3, 5, 10, 15, 20 and 25 years). This gives a balanced one-way repeated-measures design that mirrors the module’s structure: Seed is the subject, age is the within-subject (repeated) factor, the “Day” of the module, and height is the response.
5.1 Repeated-Measures One-Way ANOVA
library(afex)data(Loblolly)dat <-as.data.frame(Loblolly)dat$Seed <-factor(as.character(dat$Seed)) # subjectdat$age <-factor(dat$age) # repeated within-subject factor ("Day")afmod <- afex::aov_car( height ~ age +Error(Seed / age), # mirrors: y ~ Day + Error(Subject/Day)data = dat,anova_table =list(correction ="none", # "GG" or "HF" for sphericity correctiones ="ges") # generalized eta-squared)as.data.frame(afmod$anova_table) # num Df, den Df, MSE, F, ges and p for age
5.2 Mauchly’s Test & Sphericity Correction
s <-summary(afmod$Anova)s$sphericity.tests # Mauchly's W and p-values$pval.adjustments # GG and HF epsilon with corrected p-values# Refit with the Greenhouse-Geisser correctionafmod_gg <- afex::aov_car(height ~ age +Error(Seed / age), data = dat,anova_table =list(correction ="GG", es ="ges"))as.data.frame(afmod_gg$anova_table)
5.3 Complete ANOVA Table
# Sums of squares and mean squares for age and its within-subject errorsummary(aov(height ~ age +Error(Seed / age), data = dat))
5.4 Estimated Marginal Means & Letter Grouping
library(emmeans)alpha <-0.05adjust_method <-"none"# "none" = LSD (default) ; "tukey" = TUKEYemm <-emmeans(afmod, "age")summary(emm) # emmean and SE per agemultcomp::cld(emm, Letters = letters, adjust = adjust_method,alpha = alpha, decreasing =TRUE)
res <-residuals(lm(height ~ age + Seed, data = dat))shapiro.test(res)nortest::ad.test(res)
Explore the entire Repeated-Measures One-Way ANOVA module in preview mode using our demo datasets. To submit suggestions or report a workflow issue, please use the discussion section below, or visit the official RAISINS website.
6 RAISINS Native Statistical Framework
RAISINS uses R for all its statistical computations. Every package used to generate major results is listed and demonstrated with examples, so results can be reproduced independently. These results are then organized and formatted on the RAISINS website along with visualisation to make them easier to use and interpret. RAISINS also has its own custom-built statistical tools for managing workflows, validating results, and generating reports. Details of these are not fully covered here, they’re shared with outside researchers only on request, and are subject to licensing terms.
7 Package References
R Core Team. (2025). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/
Singmann, H., Bolker, B., Westfall, J., Aust, F., & Ben-Shachar, M. S. (2025). afex: Analysis of Factorial Experiments (R package version 1.5-1). https://doi.org/10.32614/CRAN.package.afex
Fox, J., & Weisberg, S. (2026). car: Companion to Applied Regression (R package version 3.1-5). https://doi.org/10.32614/CRAN.package.car
Lenth, R. V. (2026). emmeans: Estimated Marginal Means, aka Least-Squares Means (R package version 2.0.3). https://doi.org/10.32614/CRAN.package.emmeans
Hothorn, T., Bretz, F., & Westfall, P. (2026). multcomp: Simultaneous Inference in General Parametric Models (R package version 1.4-30). https://doi.org/10.32614/CRAN.package.multcomp
Komsta, L., & Novomestky, F. (2022). moments: Moments, Cumulants, Skewness, Kurtosis and Related Tests (R package version 0.14.1). https://doi.org/10.32614/CRAN.package.moments
Gross, J., & Ligges, U. (2015). nortest: Tests for Normality (R package version 1.0-4). https://doi.org/10.32614/CRAN.package.nortest
Kassambara, A., & Mundt, F. (2020). factoextra: Extract and Visualize the Results of Multivariate Data Analyses (R package version 2.1.0). https://doi.org/10.32614/CRAN.package.factoextra
Wickham, H., Pedersen, T. L., & Seidel, D. (2025). scales: Scale Functions for Visualization (R package version 1.4.0). https://doi.org/10.32614/CRAN.package.scales
Warnes, G. R., Bolker, B., & Lumley, T. (2023). gtools: Various R Programming Tools (R package version 3.9.5). https://doi.org/10.32614/CRAN.package.gtools
Allaire, J. J., Xie, Y., Dervieux, C., McPherson, J., Luraschi, J., Ushey, K., Atkins, A., Wickham, H., Cheng, J., Chang, W., & Iannone, R. (2026). rmarkdown: Dynamic Documents for R (R package version 2.31). https://github.com/rstudio/rmarkdown