Denote pairwise significance labeling with letters

900 views Asked by At

I have to label pairwise comparisons on a graph with letters. If the letters are the same, then they are not statistically different, and if they are statistically significant then the letters are different. My data are not normal, I know how to use the emmeans and cld function in R if I was able to do an anova, but I have to do kruskal.test followed by a pariwise.wilcox.test. I have not been able to find a way for R to give me this information either as letters or numbers. Does anybody have any insight on how to do this?

I've been using ggplot2 to make my graphs, if there is an easy way to denote this on there as well, but its manageable to do manually if I know what to label.

1

There are 1 answers

0
Russ Lenth On

You can use multcompView::multcompLetters() or one of its relatives to convert the P values into the letter groupings.

That said, I really recommend against this type of display because they emphasize what you didn't show rather than what you did.