r - How to test all sample combinations for significant differences? -
i'm analyzing dataset of 9 plots in r , want compare them each other. responding variables not distributed.
now question:
there 9+8+7+...+2+1=45 pair-combinations tested. can r automatically? if yes, how? wish-output box-whisker plot 9 plots on x-axis, responding variable on y-axis , lowercase letters above plots indicate significant differences.
thanks in advance!
this should started:
#some data x <- rlnorm(100, mean=1:4) df <- data.frame(x=x, g=c("a", "b", "c", "d"), stringsasfactors=false) #pairwise mann-whitney-u-test pairwise.wilcox.test(df$x, df$g, p.adjust.method = "bonferroni") # pairwise comparisons using wilcoxon rank sum test # #data: df$x , df$g # # b c #b 0.0016 - - #c 6.3e-09 0.0020 - #d 1.9e-13 2.0e-08 0.1823 # #p value adjustment method: bonferroni
Comments
Post a Comment