Multiple boxplots showing multiple pairwise comparisons

209 views Asked by At

I would like to display the results of non-parametric pairwise comparisons using base R boxplots. I have multiple groups (species) and multiple variables (rates).

I will provide some dummy data as my data set is quite large:

set.seed(123)
data <- data.frame(observation=1:120,
                   treatment = rep(letters[1:3], each = 40),
                   species = rep(letters[1:6], each = 20),
                   rate1 = rnorm(120),
                   rate2 = rnorm(120),
                   rate3 = rnorm(120)
                   )

My idea is to use base R to create panelled boxplots with 3 rows (rates 1-3) and 3 columns (treatments 1-3). I would like to then display the results of my nonparametric statistical tests: Kruskal Wallace for differences between treatments and post hoc Wilcoxon pairwise comparisons (letter indices) to show the difference between species within different treatments. I have not found how I can display the letters effectively.
I would like to show letters for the significant comparisons.

Thanks in advance for your help!

0

There are 0 answers