# Alternative to the Wilcoxon test when the distribution isn't continuous?

One of the assumptions for using the Wilcoxon sign-rank test is that the underlying distribution is continuous (see here.)

However, there are cases (for example, when analyzing Likert scale data) where this assumption might not necessarily hold. In such cases, what test can you use? And how would you do it with R?

(My only bet here is to use a randomization test on the median - which I imagine can be easily done using the boot package.)

• Likert scale is actually a good example of an underlying continuous variable that is collected in discrete fashion. – Aniko Nov 23 '10 at 19:38
• @Aniko Right, but the problem is that we're not sure how well the original interval scale fits into the discretized one, unless making strong assumptions. Optimal scaling might be an option there. – chl Nov 23 '10 at 21:13
• @chl That's why you are using Wilcoxon's test instead of a t-test. Wilcoxon's test does not assume equally spaced intervals, etc, so scaling is not an issue. – Aniko Nov 23 '10 at 22:11
• @Aniko I agree with you. My comment was not a critic, and reference to optimal scaling was mainly for the case where the assumption of an a priori continuous scale of measurement is not tenable--because in practice, we often rely on Likert items without making strong assumption on the underlying construct; I also agree for Mann-Whitney test with ordinal variables. – chl Nov 24 '10 at 11:28

To perform the simulation, concatenate the two data arrays (of lengths $n$ and $m$) into a single array (of length $n+m$). In each iteration randomly permute the elements of the array and break the result into the first $n$ and last $m$ elements.