Consider this data frame:
set.seed(123)
dat1 <- data.frame(Loc = rep(letters[1:20], each = 10),
ID = 1:200,
var1 = rnorm(200),
var2 = rnorm(200),
var3 = rnorm(200),
var4 = rnorm(200),
var5 = rnorm(200),
var6 = rnorm(200))
dat1$ID <- factor(dat1$ID)
I am working with data that has a similar structure to dat1
created above. Measurements of multiple variables var1:6
were taken on individuals that were randomly sampled from 20 populations, represented here by the Loc
column. I have conducted omnibus non-parametric tests (Kruskal Wallis, some other iterative procedures) on the data with a goal of estimating which Loc
s differ in which variables. I would like to do pairwise comparisons between Loc
s using a Dunn's test (for each var
), and visualize where the "significant" results are. My issue is, with this many groups (and a lot of significant differences), any approach at visualizing this with a typical boxplot with lines connecting the significant differences is just messy and hard to comprehend. Is there a better approach to visualize pairwise comparisons with this many groups (specifically with a Dunn's test)?