This Computational Provenance Record documents the statistical computing environment, software dependencies, computational provenance, and bibliographic references associated with the RAISINS Three-Factor Factorial CRD 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
y ~ A + B + C + A:B + A:C + B:C + A:B:C (three crossed factors A, B, C and their two-way and three-way interactions; A, B, C and all interaction terms taken as factors)
Sums of squares
Type II, via car::Anova(model, type = "II")
Error mean square (MSE)
Residual SS ÷ residual df from the fitted model.
Effect size
(effectsize::cohens_f())
Term effect size
Partial Cohen's f, reported for A, B, C, A×B, A×C, B×C and A×B×C
A single CD/critical difference is not defined once comparisons are adjusted, so the CD and per-term p-value rows are omitted; the adjusted result is carried by the grouping letters
Standard errors
SEM
sqrt(MSE / r) (balanced replication only; reported as “-” when replication is unequal)
SED
sqrt(2 × MSE / r) (balanced replication only)
Normality diagnostics
(on model residuals)
Default test
Shapiro–Wilk shapiro.test() (3 ≤ n ≤ 5000)
Data transformations
(optional, per variable)
Logarithmic
log10(x); if any value ≤ 0, log10(x - min(x) + 1)
Square-root
sqrt(x); if any value = 0, sqrt(x + 0.5); blocked on negative values
Arcsine
asin(sqrt(x)) on proportions in [0, 1]; 0 and 1 replaced by 1/(4n) and 1 - 1/(4n)
5 R Code for Key Analytical Steps
The code blocks below demonstrate the exact computation behind each reported result using a small, self-contained synthetic dataset: a balanced three-factor factorial with A (2 levels), B (2 levels) and C (3 levels) crossed, 4 replicates per cell, and a simulated response y. Substitute the module’s own data columns for A, B, C and y to reproduce a specific analysis.
5.1 Factorial ANOVA (Type II) and Effect Size
set.seed(123)design <-expand.grid(A =factor(c("a1", "a2")),B =factor(c("b1", "b2")),C =factor(c("c1", "c2", "c3")),rep =1:4) # balanced 2 x 2 x 3 factorial, 4 reps/celldesign$y <-with(design, 10+2* (A =="a2") +1.5* (B =="b2") +1* (C =="c2") +2* (C =="c3") +rnorm(nrow(design), sd =2))A <- design$A; B <- design$B; C <- design$C; y <- design$y # Factors A, B, C and responseAB <-factor(paste(A, B, sep =":")) # A x B interaction cellAC <-factor(paste(A, C, sep =":")) # A x C interaction cellBC <-factor(paste(B, C, sep =":")) # B x C interaction cellABC <-factor(paste(A, B, C, sep =":")) # A x B x C interaction cell# Full factorial linear model and Type II ANOVA (mirrors the module)model <-lm(y ~ A + B + C + A:B + A:C + B:C + A:B:C)result <-as.data.frame(car::Anova(model, type ="II"))result# Error (residual) mean square, reused by the post-hoc testsMSE <- result[8, 1] / result[8, 2] # residual is the 8th row (7 terms + residual)# Partial Cohen's f effect size for A, B, C and all interaction termseffectsize::cohens_f(model)
5.2 Post-hoc Mean Comparison (LSD default; Tukey / DMRT alternatives)
5.3 MANOVA Across Multiple Responses (multi-response mode)
# The app's MANOVA mode requires >= 2 response columns (one per measured trait).# Illustrated here with two response columns built from the same design.Y <-cbind(y1 = y, y2 = y +rnorm(length(y), sd =1))res.man <-manova(as.matrix(Y) ~ A + B + C + A:B + A:C + B:C + A:B:C)broom::tidy(res.man) # Pillai's trace per termeffectsize::eta_squared(res.man) # partial eta-squared per term
Explore the entire Three-Factor Factorial CRD 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/
de Mendiburu, F. (2023). agricolae: Statistical Procedures for Agricultural Research (R package version 1.3-7). https://doi.org/10.32614/CRAN.package.agricolae
Fox, J., & Weisberg, S. (2019). An R Companion to Applied Regression (3rd ed.). Sage. (car R package version 3.1-5). https://doi.org/10.32614/CRAN.package.car
Ben-Shachar, M. S., Lüdecke, D., & Makowski, D. (2020). effectsize: Estimation of Effect Size Indices and Standardized Parameters (R package version 1.0.3). https://doi.org/10.32614/CRAN.package.effectsize
Robinson, D., Hayes, A., & Couch, S. (2025). broom: Convert Statistical Objects into Tidy Tibbles (R package version 1.0.13). https://doi.org/10.32614/CRAN.package.broom
Gross, J., & Ligges, U. (2015). nortest: Tests for Normality (R package version 1.0-4). https://doi.org/10.32614/CRAN.package.nortest
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
Wickham, H., François, R., Henry, L., Müller, K., & Vaughan, D. (2023). dplyr: A Grammar of Data Manipulation (R package version 1.2.1). https://doi.org/10.32614/CRAN.package.dplyr
Wickham, H., Vaughan, D., & Girlich, M. (2024). tidyr: Tidy Messy Data (R package version 1.3.2). https://doi.org/10.32614/CRAN.package.tidyr