Installing necessary packages if not already installed

if (!requireNamespace(“lme4”, quietly = TRUE)) install.packages(“lme4”) if (!requireNamespace(“agricolae”, quietly = TRUE)) install.packages(“agricolae”)

Loading necessary libraries

library(lme4) library(agricolae)

Loading necessary libraries

library(lme4) library(ExpDes) library(agricolae) # Attaching and preparing the first dataset attach(Bio_stimulant_clean_data_1) a <- Bio_stimulant_clean_data_1 a\(Treatment <- as.character(a\)Treatment) a\(Rep <- as.factor(a\)Rep) a

Attaching and preparing the second dataset

attach(Biostimulant_Trial2_Data) b <- Biostimulant_Trial2_Data b\(Treatment <- as.character(b\)Treatment) b\(Rep <- as.factor(b\)Rep) b # Fitting the mixed model model <- lmer(Yield ~ Treatment + (1 | Rep), data = a) summary(model)

Performing ANOVA with Duncan’s multiple comparison

bb <- with(a, DBC(Treatment, Rep, Yield, mcomp = “duncan”, ylab = “Yield”, xlab = “Treatment”))

Performing ANOVA with Student-Newman-Keuls multiple comparison

aa <- with(a, DBC(Treatment, Rep, Yield, mcomp = “sk”, ylab = “Yield”, xlab = “Treatment”))

Fitting the Latin Square model

modelLatin <- lmer(Yield ~ Treatment + (1 | ID) + (1 | Rep), data = b) summary(modelLatin)