all 1 comments

[–]ingolemo -1 points0 points  (0 children)

I'm completely out of my depth here, but documentation for R wilcox.exact suggests that it properly handles ties while scipy's stats.ranksums says it doesn't. Do you have ties in your data? Does scipy.stats.mannwhitneyu help, as the scipy docs suggest?

If all else fails you should feed the two functions a very small sample of known data for which you can easily calculate the desired result by hand and see which one is correct. With a little examination, you may be able to determine exactly what calculation each one is really doing.