Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Wilcoxon test? Missing info #577

Closed
wakecarter opened this issue Sep 7, 2018 · 10 comments
Closed

Error in Wilcoxon test? Missing info #577

wakecarter opened this issue Sep 7, 2018 · 10 comments

Comments

@wakecarter
Copy link

Hi.

I'm getting different results for a Wilcoxon test in jamovi 0.9.2.3 and SPSS.

e.g. jamovi W = 1006, p = .406; SPSS sum of ranks 1002 and 1276, Z = 0.857, p = .391

I'm wondering whether this is related to the fact that SPSS tells me how many ties have been discounted (5 in this case) and jamovi doesn't.

Please could the total number of non-ties be included in the Wilcoxon output? SPSS gives N for negative ranks, positive ranks and ties separately but I don't mind not having that level of detail.

Thanks in advance,

Wakefield

@jonathon-love
Copy link
Member

hi wakefield,

we use the wilcox.test() function in R:

an exact p-value is
computed if the samples contain less than 50 finite values and
there are no ties. Otherwise, a normal approximation is used.

which i think this is probably a better approach than excluding ties.

cheers

@wakecarter
Copy link
Author

Hi Jonathon,

I'm very happy with the idea that R uses a different method of calculating the p value than SPSS. However, since adding an extra 1200 ties seems to make no difference to the test statistic nor the p value in either program then my impression is that R also ignores ties.

As a statistician I think it would be even better if increasing the number of ties made a difference less significant. In the absence of a new version of the Wilcoxon rank test, I think it would still be preferable to report how many ties there are in a data set.

Cheers,

Wake

@jonathon-love
Copy link
Member

yeah, it's interesting isn't it? intuitively, you'd think ties would make the result less significant, but apparently not.

yup, reporting the number of ties seems like a good idea.

cheers

@jonathon-love
Copy link
Member

hi @wakecarter,

i've just had a quick look at this now, and i'm finding the presence of ties does change the p-value:

screen shot 2018-09-17 at 16 48 59

@wakecarter
Copy link
Author

Sorry for the confusion. I rarely use the Wilcoxon one-sample test so I was talking about the paired sample test (using columns A & B) with ties meaning Ai = Bi.

@jonathon-love
Copy link
Member

hi wake,

i'm still finding that ties lead to a different p-value (here i'm pairing A with B, and A with C):

screen shot 2018-09-17 at 19 53 21

@wakecarter
Copy link
Author

Hi Jon.

That's because you:

use the wilcox.test() function in R:

an exact p-value is
computed if the samples contain less than 50 finite values and
there are no ties. Otherwise, a normal approximation is used.

If I add a single tie to AC then the results become the same.

wilcoxon

@jonathon-love
Copy link
Member

ah! got it!

thanks

@jonathon-love
Copy link
Member

(i appreciate your patience in typing all those values out :P)

@jonathon-love
Copy link
Member

hey @wakecarter, this is in the latest release

thanks for bringing this up.

jonathon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants