title: how to get significance codes after Kruskal Wallis post hoc test
body: <p>Is there a way to get significance codes after a pairwise comparisons to a Kruskall wallis test? With significance codes I mean letter codes that are assigned to populations to indicate where differences are significant.</p>
  
  <p>With a traditional anova such a test can be performed using <code>HSD.test</code> from the <code>agricolae</code> library but for non parametric counterparts of anova I have not been able to find anything.</p>
  
  <p>A small toy example:</p>
  
  <pre><code>dv  &lt;-  c(runif(100, 5.0, 10))
  iv  &lt;-  as.factor( c(rep("I", 10),  rep("II", 10),  rep("III", 10),  rep("IV", 10), rep("V", 10),
                      rep("VI", 10), rep("VII", 10), rep("VIII", 10), rep("IX", 10), rep("X", 10)))
  
  df  &lt;-  data.frame(dv, iv)
  
  # with anova
  library(agricolae)
  aov.000  &lt;-  aov(dv ~ iv,  data=df)
  HSD.test(aov.000, "iv")
  
  # after KW test: 
  (kt  &lt;-  kruskal.test(dv ~ iv,  data=df))
  
  library(coin)
  library(multcomp)
  NDWD &lt;- oneway_test(dv ~ iv, data = df,
          ytrafo = function(data) trafo(data, numeric_trafo = rank),
          xtrafo = function(data) trafo(data, factor_trafo = function(x)
              model.matrix(~x - 1) %*% t(contrMat(table(x), "Tukey"))),
          teststat = "max", distribution = approximate(B=1000))
  
  ### global p-value
  print(pvalue(NDWD))
  
  ### sites (I = II) != (III = IV) at alpha = 0.01 (page 244)
  print(pvalue(NDWD, method = "single-step"))
  </code></pre>