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.
In the subsection on Mann-Whitney-U currently published version, the column
yis processed using thesigned_rankfunction, 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
mannwhitneyuusing a one-sided test in the old version of scipy that is currently pinned. In latest version ofscipy, 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.