One Way ANOVA and Kruskal Wallis test in R Studio through #ggbetweenstats function
ImIqbalStat
0:00 / 0:00
One Way ANOVA and Kruskal Wallis test in R Studio through #ggbetweenstats function
390 просмотров · 2 года назад
ImIqbalStat
1,6 тыс. подписчиков
390 просмотров · 2 года назад
#################################
ONE WAY ANOVA & KRUSKAL TEST THROUGH
GGSTATSPLOT
################################
#library required........
library(ggstatsplot)
oneway=read.table("clipboard",header=T)
#attatch data...
attach(oneway)
#check data......
oneway
treatment yield
t1 2537
t2 3366
t3 2536
t4 2387
t5 1997
t6 1796
t7 1401
t1 2069
t2 2591
t3 2459
t4 2453
t5 1679
t6 1704
t7 1516
t1 2104
t2 2211
t3 2827
t4 1556
t5 1649
t6 1904
t7 1270
t1 1797
t2 2544
t3 2385
t4 2116
t5 1859
t6 1320
t7 1077
#Get the names of an object....
names(oneway)
library(car)
leveneTest(yield~treatment,data=oneway)
shapiro.test(oneway$yield)
#Run ggscatterstats function
set.seed(3)
ggbetweenstats(
data =oneway,
x = treatment,
y = yield,
type = "nonparametric",
var.equal=FALSE
)
library(car)
leveneTest(yield~treatment,data=oneway)
shapiro.test(oneway$yield)