Ia
merupakan paired test atau uji berpasangan dari variable yang tidak berhubungan
variable bebas . Uji ini seperti paired t test atau uji t berpasangan. Hanya
saja uji ini adlaah alternative dalam mengatasi data yang tidak normal. Untuk
melaksanankan ujian ini anda dapat melakukan hal ini .
>
library(readxl)
> Wilcoxon_Rank_Test
<- read_excel("stat campur/Wilcoxon Rank Test.xlsx")
Registered
S3 methods overwritten by 'tibble':
method
from
format.tbl pillar
print.tbl
pillar
>
View(Wilcoxon_Rank_Test)
>
Firstwill=Wilcoxon_Rank_Test$`Sale 1`
>
SecondWill=Wilcoxon_Rank_Test$`Sale 2`
>
boxplot(Firstwill,SecondWill,col=c(3,4))
>
wilcox.test(Firstwill,SecondWill,paired=TRUE)
Wilcoxon signed rank test with
continuity correction
data: Firstwill and SecondWill
V = 48.5,
p-value = 0.03651
alternative
hypothesis: true location shift is not equal to 0
Warning
message:
In
wilcox.test.default(Firstwill, SecondWill, paired = TRUE) :
cannot compute exact p-value with ties
>
Firstwill
[1]
10 20 25
50 45 30
50 60 100 20
50 90 60
40 20 45
65 56 38 28
>
#Wilcoxon Rank Test
>
library(readxl)
>
boxplot(Firstwill,SecondWill,col=c(3,4))
>
wilcox.test(Firstwill,SecondWill,paired=TRUE)
Wilcoxon signed rank test with
continuity correction
data: Firstwill and SecondWill
V = 48.5,
p-value = 0.03651
alternative
hypothesis: true location shift is not equal to 0
Warning
message:
In
wilcox.test.default(Firstwill, SecondWill, paired = TRUE) :
cannot compute exact p-value with ties
>
wilcox.test(Firstwill,SecondWill,paired=FALSE)
Wilcoxon rank sum test with
continuity correction
data: Firstwill and SecondWill
W = 127.5,
p-value = 0.05089
alternative
hypothesis: true location shift is not equal to 0
Warning
message:
In wilcox.test.default(Firstwill,
SecondWill, paired = FALSE) :
cannot compute exact p-value with ties
>
View(Wilcoxon_Rank_Test)
>
describe(Firstwill)
vars
n mean sd median trimmed mad min max range skew kurtosis se
X1 1 20 45.1 23.15 45
42.62 22.24 10 100 90 0.66
-0.14 5.18
>
describe(SecondWill)
vars
n mean sd median trimmed mad min max range skew kurtosis se
X1 1 20 61.8 28.47 62
60.38 37.06 20 120 100 0.31
-0.89 6.37