Wilcoxon-Mann-Whitney critical values in R I have noticed that when I try to find the critical values for the Mann-Whitney U using R, the values are always 1+critical value. For example, for $\alpha=.05, n = 10, m = 5$, the (two-tailed) critical value is 8, while for $\alpha=.05, n=12, m=8$, the (two-tailed) critical value is 22 (check the tables), but:
> qwilcox(.05/2,10,5)
[1] 9
> qwilcox(.05/2,12,8)
[1] 23

Of course I'm not considering something, but... anyone could explain me why?
 A: Remember that the rank sum test statistic is discrete and so you need to use a critical value such that the tail probability is $\geq$ to the specified $\alpha$.  For some sample sizes equal to alpha cannot be achieved and that is my guess as to why you need the +1.
A: I think that the answer here might be that you're comparing apples and oranges.
Let $F(x)$ denote the cdf of the Mann-Whitney $U$ statistic. qwilcox is the quantile function $Q(\alpha)$ of $U$. By definition, it is therefore
$$Q(\alpha)=\inf \{x\in \mathbb{N}: F(x)\geq \alpha\},\qquad \alpha\in(0,1).$$
Because $U$ is discrete, there is usually no $x$ such that $F(x)=\alpha$, so typically $F(Q(\alpha))>\alpha$.
Now, consider the critical value $C(\alpha)$ for the test. In this case, you want $F(C(\alpha))\leq \alpha$, since you otherwise will have a test with a type I error rate that is larger than the nominal one. This is usually considered to be undesirable; conservative tests tend to be prefered. Hence,
$$C(\alpha)=\sup \{x\in \mathbb{N}: F(x)\leq \alpha\},\qquad \alpha\in(0,1).$$
Unless there is an $x$ such that $F(x)=\alpha$, we therefore have $C(\alpha)=Q(\alpha)-1$.
The reason for the discrepancy is that qwilcox has been designed to compute quantiles and not critical values!
