[SciPy-Dev] `ranksums` and `mannwhitneyu` deprecation from `scipy.stats`

Ralf Gommers ralf.gommers at gmail.com
Sun Jun 14 12:03:34 EDT 2015


On Fri, Jun 5, 2015 at 12:56 AM, Alex Wagner <ahwagner22 at gmail.com> wrote:

> Hello all,
>
> The `mannwhitneyu` and `ranksums` functions are to be deprecated in 17.0
> with the introduction of the new `mww` function (for
> Mann-Whitney-Wilcoxon). Details follow.
>
> The `mannwhitneyu` function has been rewritten to include alternative
> tests (‘two-sided’, ‘less’, ‘greater’) and to do exact p-value computations
> on small input sets. This function has been renamed `mww` to avoid breaking
> backwards compatibility of `mannwhitneyu`, while fixing the reported
> p-value (`mannwhitneyu` claims to report a ‘one-sided p-value', but in
> fact reports 1/2 the p-value of a two-sided test). In addition, `mww`
> returns a Bunch object instead of a named tuple to support future additions
> to the function (see PR
> <https://github.com/scipy/scipy/pull/4933#issuecomment-108137084>).
>
> The `ranksums` function has been completely subsumed by the `mww`
> function, and is to be deprecated for this reason.
>
> If there are any objections to deprecating these functions, or the
> addition of the `mww` function, please voice them here.
>

I'm a bit late to the party, but: the name `mww` is very nondescriptive, we
usually try to avoid such names. `mann_whitney_wilcoxon` is long, but
already better.

Another option is to merge your mww with `stats.wilcoxon`, could be done by
adding a paired=True keyword to that function. This is the choice that R
has made (except defaults to Mann-Whitney):
http://stat.ethz.ch/R-manual/R-patched/library/stats/html/wilcox.test.html

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20150614/d83d67ce/attachment.html>


More information about the SciPy-Dev mailing list