Skip to content
Prev 200693 / 398503 Next

mann-whitney test with more groups

Sorry, correction below.
Peter Ehlers wrote:
y <- gl(4, 5)
   x <- rnorm(20)
   m <- cbind(t(combn(4, 2)), NA)
   for(i in 1:nrow(m))  # change 'idx' to 'm'
      m[i, 3] <-
        wilcox.test(x ~ y, subset = y %in% m[i,])$p.value  # ditto


  -Peter Ehlers