tests-as-linear icon indicating copy to clipboard operation
tests-as-linear copied to clipboard

Typo and result discrepancy for Mann-Whitney U

Open ivanistheone opened this issue 4 years ago • 0 comments

In the subsection on Mann-Whitney-U currently published version, the column y is processed using the signed_rank function, but should be just regular (unsigned) rank.

After fixing this, the p-value results were off by roughly a factor of two, which turns out is due to mannwhitneyu using a one-sided test in the old version of scipy that is currently pinned. In latest version of scipy, the default has changed to two-sided and now results are matching the LM (and also matching R's output for the same data).

I will be opening a PR shortly with these fixes.

ivanistheone avatar Oct 31 '21 17:10 ivanistheone