How to display p values in the multcompare output table?

2 visualizaciones (últimos 30 días)
Felipe Yon
Felipe Yon el 14 de Mayo de 2014
Comentada: John el 11 de Ag. de 2014
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 comentario
John
John el 1 de Jul. de 2014
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?

Iniciar sesión para comentar.

Respuestas (1)

John
John el 18 de Jul. de 2014
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 comentario
John
John el 11 de Ag. de 2014
Looks like p-values in multcompare is a new function in R2014.

Iniciar sesión para comentar.

Categorías

Más información sobre Analysis of Variance and Covariance en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by