This Computational Provenance Record documents the statistical computing environment, software dependencies, computational provenance, and bibliographic references associated with the RAISINS Three-Factor Factorial RBD module. It is intended to support computational reproducibility and software transparency. Detailed statistical methodology, and user guidance are provided separately in the official module documentation.
Any issues or updates required please comment here
The code blocks below demonstrate the exact computation behind each reported result using a small self-contained balanced three-factor factorial RBD constructed inline.
5.1 Three-Factor Factorial ANOVA & Mean Separation
# --- self-contained balanced 3-factor factorial RBD (a=2, b=2, c=3, r=4 blocks) ---set.seed(1)d <-expand.grid(FactorC =factor(paste0("c", 1:3)),FactorB =factor(paste0("b", 1:2)),FactorA =factor(paste0("a", 1:2)),Block =factor(paste0("R", 1:4)))d$Yield <-rnorm(nrow(d), mean =50, sd =5)# --- ANOVA: three-factor factorial in RBD, Type II sums of squares ---fit <-lm(Yield ~ Block + FactorA + FactorB + FactorC + FactorA:FactorB + FactorA:FactorC + FactorB:FactorC + FactorA:FactorB:FactorC, data = d)aov_tab <- car::Anova(fit, type ="II")aov_tab# --- error term for post-hoc (last row = Residuals) ---DFerror <- aov_tab["Residuals", "Df"]MSerror <- aov_tab["Residuals", "Sum Sq"] / DFerror# --- post-hoc: Fisher's LSD on Factor A (critical difference + letter grouping) ---lsd_A <- agricolae::LSD.test(d$Yield, d$FactorA,DFerror = DFerror, MSerror = MSerror, alpha =0.05)lsd_A$statistics # includes CD (critical difference), CV, MSElsd_A$groups # mean-separation letters# --- effect size: Cohen's f (partial) = sqrt(SS_effect / SS_error) ---# index the ANOVA table by [term, "Sum Sq"] so the row labels are kept# (extracting the column with [, "Sum Sq"] would drop the names -> NA on lookup)sqrt(aov_tab["FactorA", "Sum Sq"] / aov_tab["Residuals", "Sum Sq"])
5.2 Multivariate Summaries (MANOVA & PCA)
# a second response variable for a multivariate illustrationd$Yield2 <-rnorm(nrow(d), mean =30, sd =4)# --- MANOVA across the response matrix, Pillai's trace ---man <-manova(cbind(Yield, Yield2) ~ FactorA + FactorB + FactorC + FactorA:FactorB + FactorA:FactorC + FactorB:FactorC + FactorA:FactorB:FactorC, data = d)summary(man, test ="Pillai")effectsize::eta_squared(man) # partial eta-squared per source# --- PCA on standardised treatment-combination means ---mc <-aggregate(cbind(Yield, Yield2) ~ FactorA + FactorB + FactorC,data = d, FUN = mean)pca <-prcomp(mc[, c("Yield", "Yield2")], center =TRUE, scale. =TRUE)summary(pca)
Explore the entire Three-Factor Factorial RBD 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/
Fox, J., & Weisberg, S. (2019). An R Companion to Applied Regression (3rd ed.) [car: Companion to Applied Regression, R package version 3.1-5]. Sage. https://CRAN.R-project.org/package=car
de Mendiburu, F. (2023). agricolae: Statistical Procedures for Agricultural Research (R package version 1.3-7). https://CRAN.R-project.org/package=agricolae
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://CRAN.R-project.org/package=effectsize
De Rosario-Martinez, H. (2015). phia: Post-Hoc Interaction Analysis (R package version 0.3-2). https://CRAN.R-project.org/package=phia
Gross, J., & Ligges, U. (2015). nortest: Tests for Normality (R package version 1.0-4). https://CRAN.R-project.org/package=nortest
Komsta, L., & Novomestky, F. (2022). moments: Moments, Cumulants, Skewness, Kurtosis and Related Tests (R package version 0.14.1). https://CRAN.R-project.org/package=moments
Robinson, D., Hayes, A., & Couch, S. (2025). broom: Convert Statistical Objects into Tidy Tibbles (R package version 1.0.13). https://CRAN.R-project.org/package=broom
Warnes, G. R., Bolker, B., & Lumley, T. (2023). gtools: Various R Programming Tools (R package version 3.9.5). https://CRAN.R-project.org/package=gtools