Skip to main content
. 2023 Aug 6;15(15):3317. doi: 10.3390/polym15153317
Listing 1. Nonparametric comparison code.
#to import data [66].
install.packages(“readxl”)
library(readxl)
Z <- read_excel(“dir/data.xlsx”,col_names = TRUE)
#to name factors; sterile, infill, Treatment.
Z$sterile <- as.factor(Z$sterile)
Z$sterile =factor(Z$sterile,labels= c(“control”,”sterile”))
#assumption 1. Correlation among variables [67].
> corz <- cor(Z, y=NULL, method = “pearson”)
round(cor2z,2)
#assumption 2. Variables must be continuous.
#assumption 3. Non-parametric data. To group treatments.
Group1 <- subset(Z,Tr==“Control-Infill-30%”)

Group9 <- subset(Z,Tr==“Sterile-infill-90%”)
#variable Lt Behavior in group 1.
qqnorm(Group1$Lt)
qqline(Group1$Lt)
#assumption 4. Homogeneous variance among groups [68].
install.packages(“car”)
library(car)
#Variance among treatments related to Lt variable [69].
leveneTest(Z$Lt ~ Z$Tr, Z = Z)
install.packages(“FSA”)
library(FSA)
#Kruskal-Wallis’ test and Dunn’s Test for Lt Vector variable respect to treatments column Tr.
Lt <- c(Z$Lt)
kruskal.test(Lt,Z$Tr)
dunnTest(Lt,Z$Tr,method=“bonferroni”)