Following this question , I'm trying to make boxes and pairwise comparisons to show significance levels (only for significant pairs) again, but this time I have more than two groups for comparison and more complex faces.
I am going to use the aperture set for illustration. Check out the MWE below, where I add extra “processing”.
library(reshape2)
library(ggplot2)
data(iris)
iris$treatment <- rep(c("A","B"), length(iris$Species)/2)
mydf <- melt(iris, measure.vars=names(iris)[1:4])
ggplot(mydf, aes(x=variable, y=value, fill=Species)) + geom_boxplot() +
stat_summary(fun.y=mean, geom="point", shape=5, size=4) +
facet_grid(treatment~Species, scales="free", space="free_x") +
theme(axis.text.x = element_text(angle=45, hjust=1))
The result is the following graph:

The idea would be to carry out the Kruskal-Wallis test on "variable" groups (Sepal.Length, Sepal.Width, Petal.Length, Petal.Width) and on the Wilcoxon pair tests between them, PER FACET, Types "and" treatment "
, , .
, , , , PER FACET.
, ... ! !!