This Computational Provenance Record documents the statistical computing environment, software dependencies, computational provenance, and bibliographic references associated with the RAISINS Completely Randomized Design (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
Pooled MSerror = MSE and DFerror = residual df from the one-way model; alpha = α
Grouping display
Letters shown only when the treatment p ≤ α; group labels ordered with gtools::mixedsort(); grouping is suppressed when the number of treatments exceeds 80
Critical value reported
CD/LSD (LSD), HSD (Tukey), or Duncan critical ranges (DMRT). The trait-wise Individual ANOVA table reports CD at both 5% and 1%
A single CD/critical difference is not defined once comparisons are adjusted, so the CD row is 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)
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)
MANOVA
(multi-response mode)
Test statistic
Pillai's trace (the stats::manova() default), tidied with broom::tidy()
Requirement
At least two response variables, and the number of treatments must exceed the number of response variables
5 R Code for Key Analytical Steps
The code blocks below demonstrate the exact computation behind each reported result using PlantGrowth (built into the datasets package): a balanced completely randomized experiment with one factor group (control plus two treatments), 10 replicates per treatment, and dried plant weight as the response.
5.1 One-Way ANOVA and Effect Size
data(PlantGrowth)d <- PlantGrowth # weight ~ group, 3 treatments x 10 reps, balancedtreatment <-factor(d$group) # single treatment factory <- d$weight # response variable# One-way linear model and ANOVA table (mirrors the module; one model per response)model <-lm(y ~ treatment)result <-anova(model)result # F = 4.85, p = 0.0159# Error (residual) mean square and df, reused by the post-hoc testsMSE <- result[2, 3] # 0.3886dferr <- result[2, 1] # 27# Cohen's f effect size, derived from eta-squaredeta2 <- lsr::etaSquared(model)[1, 1] # 0.2641sqrt(eta2 / (1- eta2)) # 0.5991
5.2 Post-hoc Mean Comparison (LSD default; Tukey / DMRT alternatives)
alpha <-0.05# default significance level# Least Significant Difference (default): agricolae uses the pooled MSE and# residual df from the one-way model; grouping letters ordered with mixedsort.out <- agricolae::LSD.test(y, treatment, DFerror = dferr, MSerror = MSE,alpha = alpha, p.adj ="none", group =TRUE)out$groups[gtools::mixedsort(rownames(out$groups)), ]out$statistics # MSerror, Df, Mean, CV, t.value, LSD (= CD)# Grouping letters are printed only when the treatment effect is significant:if (result[1, 5] > alpha) out$groups[, 2] <-""# Optional p-value adjustment for LSD (default "none"; selectable: bonferroni, holm, BH).# agricolae applies the correction internally and recomputes the grouping letters.agricolae::LSD.test(y, treatment, DFerror = dferr, MSerror = MSE, alpha = alpha,p.adj ="bonferroni")$groups# Alternatives selectable in the app (same DFerror / MSerror / alpha arguments):# Tukey HSD -> agricolae::HSD.test(y, treatment, DFerror = dferr, MSerror = MSE, alpha = alpha)# DMRT -> agricolae::duncan.test(y, treatment, DFerror = dferr, MSerror = MSE, alpha = alpha)# Standard errors from the pooled MSE (r = replications per treatment)r <- out$means[1, 3] # 10SEM <-sqrt(MSE / r) # 0.1971SED <-sqrt(2* MSE / r) # 0.2788
5.3 MANOVA Across Multiple Responses (multi-response mode)
# The app's MANOVA mode requires >= 2 response columns (one per measured trait)# and more treatments than response variables. Illustrated with `iris`, a# completely randomized layout of 3 treatments x 50 units and 4 measured traits.data(iris)trt <-factor(iris$Species)Y <-as.matrix(iris[, 1:4])res.man <-manova(Y ~ trt)broom::tidy(res.man) # Pillai's trace for the treatment termeffectsize::eta_squared(res.man) # partial eta-squared
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
Navarro, D. J. (2015). Learning Statistics with R: A Tutorial for Psychology Students and Other Beginners. University of New South Wales. (lsr R package version 0.5.2). https://doi.org/10.32614/CRAN.package.lsr
Ben-Shachar, M. S., Lüdecke, D., & Makowski, D. (2020). effectsize: Estimation of Effect Size Indices and Standardized Parameters (R package version 1.0.2). 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
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.1.4). https://doi.org/10.32614/CRAN.package.dplyr
Wickham, H., Vaughan, D., & Girlich, M. (2025). tidyr: Tidy Messy Data (R package version 1.3.2). https://doi.org/10.32614/CRAN.package.tidyr