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)?

  • $\begingroup$ 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. $\endgroup$
    – Glen_b
    Apr 7, 2017 at 6:18
  • $\begingroup$ @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. $\endgroup$
    – Thredolsen
    Apr 8, 2017 at 10:30
  • $\begingroup$ Isn't the effect of different sample size already accounted for in the Kruskal Wallis -- in the same was it is in ANOVA? $\endgroup$
    – Glen_b
    Apr 8, 2017 at 10:33
  • $\begingroup$ 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. $\endgroup$
    – Thredolsen
    Apr 8, 2017 at 11:14
  • 1
    $\begingroup$ 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. $\endgroup$
    – Glen_b
    Apr 8, 2017 at 11:16


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.