[Rd] Base R wilcox.test gives incorrect answers, has been fixed in DescTools, solution can likely be ported to Base R
Ben Bolker
bbo|ker @end|ng |rom gm@||@com
Mon Dec 11 17:03:28 CET 2023
You could request a bugzilla account and post it to
https://bugs.r-project.org/ yourself: from
https://www.r-project.org/bugs.html,
> In order to get a bugzilla account (i.e., become “member”), please
send an e-mail (from the address you want to use as your login) to
bug-report-request using r-project.org briefly explaining why, and a volunteer
will add you to R’s Bugzilla members.
(On the other hand, I think that posting to this list was a good idea
in any case, as it is more visible than the bugs list and may spark some
useful discussion.)
cheers
Ben Bolker
On 2023-12-11 9:44 a.m., tkpmep using gmail.com wrote:
> While using the Hodges Lehmann Mean in DescTools (DescTools::HodgesLehmann),
> I found that it generated incorrect answers (see
> <https://github.com/AndriSignorell/DescTools/issues/97>
> https://github.com/AndriSignorell/DescTools/issues/97). The error is driven
> by the existence of tied values forcing wilcox.test in Base R to switch to
> an approximate algorithm that returns incorrect results - see
> <https://aakinshin.net/posts/r-hodges-lehmann-problems/>
> https://aakinshin.net/posts/r-hodges-lehmann-problems/ for a detailed
> exposition of the issue.
>
>
>
> Andri Signorell and Cyril Moser have a new C++ implementation of
> DescTools::HodgesLehmann using a O(N log(N)) algorithm due to Monahan, but
> wilcox.test in Base R appears to be still broken. Will someone kindly bring
> this observation, as well as the existence of a solution, to the attention
> of the relevant person(s) in the Base R development team?
>
>
>
> The paper by Mohanan, as well as the original Fortran implementation of the
> algorithm are linked to from
> <https://github.com/AndriSignorell/DescTools/issues/97>
> https://github.com/AndriSignorell/DescTools/issues/97). Inefficient O(N^2)
> algorithms for the Hodges-Lehmann mean are known and are implemented in a
> variety of packages. For example, the authors of rt.test
> (https://cran.r-project.org/web/packages/rt.test) use the O(N^2) approach. I
> suspect that Andri and Cyril will be more than happy to assist with fixing
> wilcox.test in Base R with their implementation of Monahan's fast algorithm.
>
>
>
> Sincerely
>
>
>
> Thomas Philips
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
More information about the R-devel
mailing list