column 6 at matrix 'm' of multcompare

2 views (last 30 days)
Jinsol
Jinsol on 7 Oct 2014
Answered: Tom Lane on 9 Oct 2014
using multcompare I did ANOVA analysis. It says that matrix 'm' has to be p by 6 matrix. However, my result only has 5 columns, with no 6th column. I need the p-value. What can I do to get the 6th column
  1 Comment
Bruno Pop-Stefanov
Bruno Pop-Stefanov on 8 Oct 2014
The m output matrix contains only 2 columns. I suppose you are referring to the first output argument, c. The matrix c should always contain 6 columns. From the doc:
Matrix of multiple comparison results, returned as an p-by-6 matrix of scalar values, where p is the number of pairs of groups. Each row of the matrix contains the result of one paired comparison test. Columns 1 and 2 contain the indices of the two samples being compared. Column 3 contains the lower confidence interval, column 4 contains the estimate, and column 5 contains the upper confidence interval. Column 6 contains the p-value for the hypothesis test that the corresponding mean difference is not equal to 0.
If the first output has only 5 columns, can you include reproduction code so that we can see what's going wrong? Don't forget to attach your data as a MAT file so that we can run your code.
Thanks.

Sign in to comment.

Answers (1)

Tom Lane
Tom Lane on 9 Oct 2014
The sixth column was added some time after the multcompare function was originally created. Could it be that you are looking at the doc on the web, and you are running an older release? Try "help multcompare" and see what it says.

Community Treasure Hunt

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

Start Hunting!