Computational Provenance & Reproducibility Record

RAISINS - R and AI Solutions for INferential Statistics · Online Statistical Analysis Platform for Agricultural Research

Computational Provenance & Reproducibility Record Split-Plot Design · 2.0.0 · DOI 10.5281/zenodo.22105817

Computational Provenance & Reproducibility Record

RAISINS · Split-Plot Design

This Computational Provenance Record documents the statistical computing environment, software dependencies, computational provenance, and bibliographic references associated with the RAISINS Split-Plot Design. 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

Go to the App from here

1 Module Metadata

Parameter Specification
Module Split-Plot Design
Module Version 2.0.0
DOI 10.5281/zenodo.22105817
Document Type Computational workflow
Statistical Engine R
R Version 4.5.2
Reproducibility Execution Environment: Posit Connect · GCR · renv-locked

2 Statistical Dependency Manifest

Package Version Repository Core Statistical Functions
agricolae 1.3-7 CRAN sp.plot() (split-plot ANOVA), LSD.test(), HSD.test(), duncan.test()
effectsize 1.0.2 CRAN cohens_f() (effect size)
gtools 3.9.5 CRAN mixedsort() (natural ordering of treatment rows)

3 Statistical Function Registry

Analytical Role Primary Function(s)
Split-plot ANOVA (two error strata) agricolae::sp.plot(block, pplot, splot, Y)
Effect-size model fit stats::lm(Y ~ Block + A + Block:A + B + A:B)
Cohen’s f effect size effectsize::cohens_f(model_lm)
Main-plot (A) mean separation agricolae::LSD.test / HSD.test / duncan.test at Error(a) df & MS (gl.a, Ea)
Sub-plot (B) and A×B mean separation agricolae::LSD.test / HSD.test / duncan.test at Error(b) df & MS (gl.b, Eb)
Standard errors (SEm, SEd) & critical difference base::sqrt(), stats::qt() (composite t for whole-plot comparisons)
Natural ordering of treatment tables gtools::mixedsort()

4 Default Methods & Parameters

Analysis Step / Parameter Default Method / Value
Split-Plot
ANOVA

(sp.plot())
Model Split-plot in randomised blocks via sp.plot(Block, A, B, Y), where A is the main-plot (whole-plot) factor and B the sub-plot factor. Two error strata are estimated.
Sources of variation Replication, Main Plot (A), Error(a), Sub Plot (B), A×B, Error(b). Factor A is tested against Error(a); Factor B and A×B against Error(b).
Mean
Separation

(LSD.test,
HSD.test,
duncan.test)
Test User-selectable: LSD (default), TUKEY (HSD), or DMRT (Duncan)
Error stratum used Main-plot factor A uses Error(a) degrees of freedom and mean square (gl.a, Ea); sub-plot factor B and the A×B interaction use Error(b) (gl.b, Eb)
Letter groupings Compact letter groups from the selected agricolae test; rows are ordered by gtools::mixedsort().
Precision
Statistics
SEm / SEd SEm = √(MSE/r); SEd = √(2·MSE/r), each computed within its own error stratum
Whole-plot comparison CD For comparing main-plot means at the same/different sub-plot level, a composite critical difference is used with a weighted t:
t' = (b·Eb·t_b + Ea·t_a) / (b·Eb + Ea), then CD = t' · √(2((b−1)Eb + Ea)/(r·b))
Effect Size
(cohens_f())
Model Cohen's f computed from lm(Y ~ Block + A + Block:A + B + A:B), reported per term (A, B, A×B)
Transformations
(response
variables only)
Logarithmic log10(x); if any value ≤ 0, an offset is applied as log10(x − min(x) + 1)
Square root sqrt(x); if any value = 0, sqrt(x + 0.5); negative values are rejected with a warning
Arcsine asin(sqrt(p)) for proportions in [0, 1]; boundary values corrected by 1/(4n) (0 → 1/(4n), 1 → 1 − 1/(4n)); values outside [0, 1] are rejected

5 R Code for Key Analytical Steps

The code blocks below demonstrate the exact computation behind each reported result using the built-in split-plot dataset shipped with agricolae (plots — a rice experiment with nitrogen as the whole-plot factor and variety as the sub-plot factor).

5.1 Split-plot ANOVA (two error strata)

library(agricolae)

data(plots)               # agricolae's built-in split-plot example
plots$block <- factor(plots$block)
plots$nitrogen <- factor(plots$nitrogen)   # whole-plot (main-plot) factor A
plots$variety  <- factor(plots$Variety)    # sub-plot factor B

# Split-plot ANOVA: sp.plot(block, main-plot, sub-plot, response)
sp <- with(plots, sp.plot(block, nitrogen, variety, yield))

sp$ANOVA          # Replication / A / Error(a) / B / A:B / Error(b)
sp$gl.a; sp$Ea    # Error(a) df and mean square (used for factor A)
sp$gl.b; sp$Eb    # Error(b) df and mean square (used for factor B and A:B)

5.2 Mean separation and effect size

library(agricolae)
library(effectsize)

alpha <- 0.05

# --- Main-plot factor A: tested against Error(a) (gl.a, Ea) ---
outA <- with(plots, LSD.test(yield, nitrogen, sp$gl.a, sp$Ea, alpha = alpha))
outA$groups                                  # means + letter groupings
sem_A <- sqrt(outA$statistics[1, "MSD"] / outA$means[1, 3])   # illustrative SEm

# --- Sub-plot factor B and A:B: tested against Error(b) (gl.b, Eb) ---
outB <- with(plots, LSD.test(yield, variety, sp$gl.b, sp$Eb, alpha = alpha))
outB$groups

# TUKEY (HSD) or DMRT (Duncan) alternatives share the same error-stratum arguments:
# HSD.test(yield, nitrogen, sp$gl.a, sp$Ea, alpha = alpha)
# duncan.test(yield, variety,  sp$gl.b, sp$Eb, alpha = alpha)

# --- Cohen's f effect size, from the full linear model ---
model_lm <- lm(yield ~ block + nitrogen + block:nitrogen + variety + nitrogen:variety,
               data = plots)
cohens_f(model_lm)                           # per-term effect sizes (A, B, A:B)

Explore the entire Split-Plot Design 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

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

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

Feedback & Discussion