0

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?

thelatemail
  • 91,185
  • 12
  • 128
  • 188
Marie
  • 254
  • 1
  • 2
  • 13
  • Have you tried `wilcox.test` from package `MASS`? – Sun Bee Oct 12 '16 at 05:08
  • 1
    This sounds more appropriate for code review or for a statistics forum. .My guess is that you don't realize that there are different Wilcoxon tests. – IRTFM Oct 12 '16 at 07:00
  • 1
    There are different Wilcoxon tests. However, in the help about scmamp in R is written that the test has been implemented according to the versión in Demsar, for this reason it is my doubt. I think miss to set any parameter o anything because i should get the same result in the paper and using scmamp. – Marie Oct 14 '16 at 16:43

1 Answers1

1

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

Borja
  • 26
  • 1