when I use wilcox.test to run a Mann Whitney U non-parametric test, the W value that is returned is the larger of the two U values. That seems strange to me, as the MWU test uses the smaller of the two U values as the test statistic, so I would want to see that value to report the data. Below is an example. If I run the code in R, the W value is listed at 214.
wilcox.test(disp ~ am, data = mtcars)
But if I calculate this using another program or website (I like this calculator: https://www.socscistatistics.com/tests/mannwhitney/), I get that the two U values are 33 and 214. We then use 33 to check against the critical value and would report that value.
Is there any package that calculates the MWU in a more user-friendly way where it shows the correct/smaller U value as the test statistic? I tried rstatix's version and that does the same thing. Also, does anyone know why this would be the default behavior? It seems counterintuitive.