Inconsistent mean differences sign for Mann-Whitney test

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
vmoreno
Posts: 21
Joined: Mon Jun 05, 2017 6:04 pm

Inconsistent mean differences sign for Mann-Whitney test

Post by vmoreno »

Hi,
The Mann-Whitney test reports reversed sign for the mean difference.
See the attached figure.

Also, I don't know how the reported statistic is calculated. It is different from W reported by wilcox.test
The p-value is the same, so I suppose it must be a transformation

Victor
Attachments
screenshot_03.png
screenshot_03.png (99.76 KiB) Viewed 1804 times
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Inconsistent mean differences sign for Mann-Whitney test

Post by jonathon »

oh this keeps biting me.

so mann-whitney produces two U statistics, and you're supposed to use the smaller value.

but the wilcox.test in R has a bug/feature where it gives you one of the U statistics, but not necessarily the smaller one. so we have to run it both ways, see which is the smaller U value, and use that.

to run it both ways, i just swap the groups. this first bit me, because i wasn't using the right p-value with the one-sided tests. now it's bitten me because i didn't adjust the means!

anyhow, thanks for reporting, i'll commit a fix now.

cheers

jonathon

ps. when somethings clearly a bug, it's best to report it in the github issue tracker.
Post Reply