Be the first to rate this file! 13 Downloads (last 30 days) File Size: 1.9 KB File ID: #38839

Group means with letters in a multiple comparison test

by

 

Grouping means by letters in a multiple comparison test

| Watch this File

File Information
Description

Perform grouping of the means in a multiple comparison test using letters.
Multiple comparison test can be by Tukey-HSD, LSD, Bonferroni, Dunn-Sidak or Scheffe.

WARNING: is indispensable that the means of x matrix are sorted in crescent order.
 
Example:
 
For 3 treatments in 4 replications:
   x=[9.0 1.0 3.1
      5.0 2.0 3.2
      7.0 1.1 3.0
      8.0 1.2 3.0];

Sorting x in crescent order:
   [me or]=sort(mean(x),2);
   xo=x(:,or);

ANOVA:
   [p,a,s] = anova1(xo);

Multcompare using HSD Tukey at 5% significance:
   [c,m,h,nms] = multcompare(s,'alpha',0.05,'ctype','hsd');

Post-hoc grouping:
   phg = phgroup(xo,c);

phg =
 
 mean std group
7.2500 1.7078 a
1.3250 0.4573 b
3.0750 0.0957 b

Required Products Statistics Toolbox
MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us