# Why isn't it possible to use fractional weights for Kruskal-Wallis test?

When I try to run a Kruskal-Wallis test on a sample with fractional weights, SPSS throws the following warning:

Frequency weight data values must be positive integers.
Positive non-integer frequency weight data values are encountered.
These values are rounded to the nearest integers for the analysis.


When I try to run the same analysis in R, it simply doesn't run unless I round the weights myself.

What's the reason behind this? How come the same thing doesn't apply in other non-parametric tests, such as correlations (e.g. Kendall-Tau)?

• What was the reason for weighting the observations? It might make a difference in some case. For example, if it's based on having different conditional variances, note that a monotonic transformation (such as taking logs) would alter the relative sizes of the conditional variances, without changing the Kruskal-Wallis statistic, so that kind of weighting may be unnecessary in many cases. Apr 7, 2017 at 6:18
• @Glen_b difference in count of the different groups (e.g. one group had 80 cases, while another had 20 cases). The weighing gave each group an equal representation in the sample. Apr 8, 2017 at 10:30
• Isn't the effect of different sample size already accounted for in the Kruskal Wallis -- in the same was it is in ANOVA? Apr 8, 2017 at 10:33
• When running an ANOVA, there is a difference in the result between the weighted versus unweighted samples for me, though there isn't one with Kruskal-Wallis. Apr 8, 2017 at 11:14
• My point was that you wouldn't run a weighted analysis in ANOVA either, since it already accounts for differences in sample size when its unweighted. You'd only use weights for that sort of thing if your raw data were averages rather than the actual observations. Apr 8, 2017 at 11:16