Marie
Marie

Reputation: 254

Wilcoxon signed-ranks test with R vs by hand

I need to compare two algorithms with Wilcoxon signed-ranks test. I found a library called scmamp in R. In scmamp there is a function wilcoxonSignedTest() implementing the test according to the version in Demsar (2006). However, I have to compute manually and i have gotten the same results in paper ( T= 12) but when I have to compute with scmap I have gotten T = 46.5, p-value = 0.3532.

The code is next:

d=c(0.763,0.599,0.954,0.628,0.882,0.936,0.661,0.583,0.775,1.000,0.940,0.619,0.972,0.957)
e=c(0.768,0.591,0.971,0.661,0.888,0.931,0.668,0.583,0.838,1.000,0.962,0.666,0.981,0.978)
 wilcoxonSignedTest(d,e)

Why the result to calculate manually and with scmamp is different? how could get the same result?

Upvotes: 0

Views: 417

Answers (1)

Borja
Borja

Reputation: 26

As one of the answers says, there are different versions of the Wilcoxon test, and that is the reason why this particular implementation has the exact reference to the version implemented. Unfortunately, there was a bug that now we have corrected. (so far in github, in a couple of days in CRAN).

Just as a warning, although this is a non-parametric test, it makes the assumption of continuity

Upvotes: 1

Related Questions