Likan Zhan

Nonparametric Tests of Group Differences

Likan Zhan · 2017-05-02

This post is adapted from Quick-R

R provides functions for carrying out Mann-Whitney U, Wilcoxon Signed Rank, Kruskal Wallis, and Friedman tests.

wilcox.test(y ~ A) # where y is numeric and A is A binary factor
wilcox.test(y, x) # where y and x are numeric
wilcox.test(y1, y2, paired = TRUE) # where y1 and y2 are numeric
kruskal.test(y ~ A) # where y1 is numeric and A is a factor
friedman.test(y ~ A | B) # where y are the data values, A is a grouping factor and B is a blocking factor