I am trying to identify from the 'c' output of multcompare the significantly different pairs (i.e. without having to use the interactive figure)
In this example the confidence interval does not contain 0, so the difference is significant at the 5% significance level. If the confidence interval did contain 0, the difference would not be significant
This suggests that significantly different pairs are not the rows in c where the lower bound (column 3) < 0 & the upper bound (column 5) > 0.
However in the attached example below this doesn't quite appear to be the case.
[p, tbl, stats] = anova1(exampleinput.D,exampleinput.form,"ON");
[c,m,~,gnames] = multcompare(stats,"Alpha",0.05,"CType","bonferroni")
significantpairs = c(~(c(:,3) < 0 & c(:,5) > 0),:)
pairs = [gnames(significantpairs(:,1)), gnames(significantpairs(:,2))]
The above code nearly gets it right.
the interactive graph identifies FCK and WBCK as being different, the code does not.
The code identifies FCK and SECK as being different, the graph does not.
The 5 other pairs are correctly identified.
I have tried to extract the different pairs by writing a function utilising this method, as suggested here. This didn't quite work. Changing CType to 'tukey-kramer' (suggested here by Peter König), yields similiar results, some pairs are correctly identified, some are not.
So, the question is: which to trust: the interactive graph, or the code? Or rather, what is the interactive graph doing that I'm not?