Good day all,

My first posting to this list. It looked like the best place to post this
question.

When running the wilcox.test(), I noticed that the output values change if
you change the ordering of the levels (example below which includes a
t.test for comparison). I think this has something to do with the change in
ranking order, but this doesn't make much sense as I would expect the
ranking in this case to remain constant as there are no ties. So my
questions are: a) is this correct (i.e. not a bug)?, and b) if it is, then
which values should I report?


x <- cbind(data.frame((c(rep("A",50),rep("B",50)))),runif(100))
colnames(x) <- c("a","b")
wilcox.test(b~a,data=x)
t.test(b~a,data=x)
x$a <- relevel(x$a,ref="B")
wilcox.test(b~a,data=x)
t.test(b~a,data=x)

Thank you in advance for your time,
Regards,
Alastair

	[[alternative HTML version deleted]]

