% Test p-value alpha Comment
% 1-4 0.0013 0.0085 Reject Ho
% 1-3 0.0078 0.0102 Reject Ho
% 1-2 0.0553 0.0127 Fail to reject Ho
% 2-4 0.1254 No comparison made Ho is accepted
% 2-3 0.3563 No comparison made Ho is accepted
% 3-4 0.5606 No comparison made Ho is accepted
-----------
Is it possible to do the same with multcompare? The information lies within the graph-output, however it is not included in the command-output.
Any suggestions
Markus
Markus, the p-values of individual comparisons aren't computed in
multicompare and so there's no way to get them from that function. The
function basically computes intervals around each comparison and looks for
ones that overlap zero, instead of computing p-values and looking for ones
less than 0.05.
I haven't thought much about this before. The idea behind multcompare is to
strive for an overall significance level of, say, 0.05, and test individual
differences preserving this overall level if the null hypothesis is true. I
suppose the p-values for the individual tests would be defined as the
overall p-value such that that individual difference is just significant.
Is that right?
This might be something we could consider for the future, but we don't have
it now.
-- Tom
Question 1: How is the confidence interval calculated in multcompare? Here's the Matlab example:
strength = [82 86 79 83 84 85 86 87 74 82 ...
78 75 76 77 79 79 77 78 82 79];
alloy = {'st','st','st','st','st','st','st','st',...
'al1','al1','al1','al1','al1','al1',...
'al2','al2','al2','al2','al2','al2'};
[p,a,s] = anova1(strength,alloy);
[c,m,h,nms] = multcompare(s);
[nms num2cell(c)]
ans =
'st' [1] [2] [ 3.6064] [ 7] [10.3936]
'al1' [1] [3] [ 1.6064] [ 5] [ 8.3936]
'al2' [2] [3] [-5.6280] [-2] [ 1.6280]
In this example the confidence interval 95% for ‘st’ vs. ‘al1’ is 3.6064 to 10.3936 and 7 (mean differences) is Mean differences= mean(‘st’)=84 minus mean(‘al1’)=77.
This might be a stupid question but how is the confidence interval calculated?
As: CI=Mean differences +/- 1.96*std(M)/sqrt(n)?
Where M=[‘st’ ‘al1’] and n=length(M).
However, this calculation of CI is not the same as in the matlab example.
Question 2: How are the lengths of the comparison intervals in the multcompare-qraph calculated?
Markus
"Tom Lane" <tl...@mathworks.com> wrote in message <gf9jlj$5fh$1...@fred.mathworks.com>...
Getting back to this question, I was wondering if you could think of any modification in the multcompare code so that it can measure p-values for all the pairwise comparisons that it is performing. if not, do you know any other code which it can do that?
Thanks
Armin
"Tom Lane" <tl...@mathworks.com> wrote in message <gf9jlj$5fh$1...@fred.mathworks.com>...