Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(dunn.test) #available on CRAN
- ## count data
- df <- data.frame(group=LETTERS[1:3], count = c(1,3,5,4,4,6,1,3,5,2,3,5,1,5,3,4,2,5))
- kruskal.test(count~group, data=df)
- #Kruskal-Wallis rank sum test
- #
- #data: count by group
- #Kruskal-Wallis chi-squared = 8.7041, df = 2, p-value = 0.01288
- # non-formula usage (default "holm" method)
- dunnTest(df$count,df$group)
- #Dunn (1964) Kruskal-Wallis multiple comparison
- # p-values adjusted with the Holm method.
- #
- # Comparison Z P.unadj P.adj
- #1 A - B -1.131517 0.257837400 0.25783740
- #2 A - C -2.925386 0.003440288 0.01032086
- #3 B - C -1.793869 0.072834082 0.14566816
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement