How to display p values in the multcompare output table?

Hello,
I would like to know which extra arguments or commands should be entered in the multcompare (for anova data) so it can display the p values in the output table instead of just the means and confident intervals. Because getting the values by clicking one by one in the output graph is futile.
Or at any case if there is another post-hoc commands for doing the same but showing the p values.
thanks, Felipe

댓글 수: 1

Yes there is something funky going on with Matlab. Following along with the second example here: http://www.mathworks.com/help/stats/multcompare.html this happens:
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(c(:,1)), nms(c(:,2)), num2cell(c(:,3:6))]
??? Index exceeds matrix dimensions.
c
c =
1.0000 2.0000 3.6064 7.0000 10.3936
1.0000 3.0000 1.6064 5.0000 8.3936
2.0000 3.0000 -5.6280 -2.0000 1.6280
The 6th column, which is meant to have the p-values for the Tukey-Kramer multiple comparison, is not working correctly. I tried this on both Matlab R2011a (7.12) and R2013b (8.2) which has a recent stats package. I'm trying to figure out the code myself now, but to get the p-value you need a look-up table, which might make it hard to automate.
Anyone else have this problem and figure it out?

댓글을 달려면 로그인하십시오.

답변 (1개)

John
John 2014년 7월 18일

1 개 추천

I was able to use the confidence intervals to test for significance (if the values in columns 3 and 5 are both greater or both less than 0 then the test is significant). However column 6 is still missing the p-values. There's probably some way to get them using fcdf or something but I don't feel like digging into the statistics.

댓글 수: 1

Looks like p-values in multcompare is a new function in R2014.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Analysis of Variance and Covariance에 대해 자세히 알아보기

질문:

2014년 5월 14일

댓글:

2014년 8월 11일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by