Skip to content
Prev 18121 / 398502 Next

Wilcoxon Rank Sum Test

Ngayee.Law at celeradiagnostics.com writes:
Yes, but only if there are no ties in the data.

You can just print wilcox.test.default and see the following code:

        if (exact && !TIES) {
            PVAL <- switch(alternative, two.sided = {
                p <- if (STATISTIC > (n.x * n.y/2)) 
                  pwilcox(STATISTIC - 1, n.x, n.y, lower = FALSE)
                else pwilcox(STATISTIC, n.x, n.y)
                min(2 * p, 1)
            }, greater = {
                pwilcox(STATISTIC - 1, n.x, n.y, lower = FALSE)
            }, less = pwilcox(STATISTIC, n.x, n.y))

            ....
        }