'Life is after all a recursive summation, indeed     Let's do some Statistics!

Department of Civil and Environmental Engineering
Frank Batten College of Engineering and Technology
Old Dominion University
Norfolk, Virginia 23529-0241, USA
Tel) (757) 683-3753
Fax) (757) 683-5354


	
Return to CEE 700/800 Homepage
CEE 700/800 Access Counter
 
Go back to
SAS Source Page
Multiple Means Comparison (MMC)
SAS Source: MMC.SAS

Once a null hypothesis for a treatment (and/or a block) effect is rejected for a given experimental design (CR, RCB, Latin Square, Factorial, etc.), the next step is to find out which particular treatment produced the max./min. effect. Previously, you have used either z-dist. or t-dist. 'pairwise mean comparison' method for such purpose.

However, these z- and t-dist. methods can only compare two means at any given time, and if you have more than two treatments to compare (i.e., five of six treatments) you need to repreat the comparison for nCr combination times.

Multiple Means Comparison (MMC) is a technique that you can use to compare more than two means of effect simultaneously. Among several well-known MMC methods, Duncan's Multiple Range Test (MRT) is most conservative. Other MMC techniques include Student-Newman-Keuls (SNK), Fisher's Least Significant Difference (LSD), Tukey's Honestly Significant Difference (HSD), and Scheffe's procedures.

In regard to interpretation of MRT results, means with the same letter are not significantly different, i.e., equal. Depending on the proportionality of independent and dependent variables in your problem, you can then identify a particular treatment(s), i.e., a magic potion(s), that maximize/minimize the outcome of the experiment.

MMC is based on MEANS procedure with explicit CLASS declaration specifying treatment/block element(s) to be compared.


Use following SAS source to analyze above problem -- it contains
four different experimental design examples; one each for 
CR, RCB, Latin square design and two factorial designs.

Closely examine comments in the source for specific 
model options.

SAS Listing


OPTIONS LINESIZE=80;
TITLE1 'Multiple Means Comparison (MMC)';
TITLE2 '------------------------------------';
TITLE3 'Example #1 -- CR design';
TITLE4 '------------------------------------';
DATA FIBER;
/* @@ means a loop in reading input variable sequence */
INPUT COTTON STRENGTH  @@;
CARDS;
15 7  15 7  15 15 15 11 15 9
20 12 20 17 20 12 20 18 20 18
25 14 25 18 25 18 25 19 25 19
30 19 30 25 30 22 30 19 30 23
35 7  35 10 35 11 35 15 35 11
;
RUN;

PROC ANOVA DATA=FIBER;
/* CLASS defines treatment(s) whose mean effects will be compared */
     CLASS COTTON;
     MODEL  STRENGTH=COTTON;
     MEANS COTTON / DUNCAN;
RUN;

DATA BACTERIA;
/* @@ means a loop in reading input variable sequence */
INPUT DAYS SOLUTION EFFECTNS @@;
CARDS;
1 1 13 2 1 22 3 1 18 4 1 39
1 2 16 2 2 24 3 2 17 4 2 44
1 3  5 2 3  4 3 3  1 4 3 22
;
RUN;

PROC ANOVA DATA=BACTERIA;
TITLE3 'Example #2 -- RCB design';
TITLE4 '------------------------------------';
/* CLASS defines treatment(s) whose mean effects will be compared */
     CLASS DAYS SOLUTION;
     MODEL  EFFECTNS = DAYS SOLUTION;
     MEANS  DAYS SOLUTION / DUNCAN;
RUN;

DATA PROCESS;
/* @@ means a loop in reading input variable sequence */
/* $ after a variable means that the variable is alphanumeric */
INPUT BATCH DAY CATALYST $ REACTIME @@;
CARDS;
1 1 A 8   1 2 B 7   1 3 D 1   1 4 C 7   1 5 E 3
2 1 C 11  2 2 E 2   2 3 A 7   2 4 D 3   2 5 B 8
3 1 B 4   3 2 A 9   3 3 C 10  3 4 E 1   3 5 D 5
4 1 D 6   4 2 C 8   4 3 E 6   4 4 B 6   4 5 A 10
5 1 E 4   5 2 D 2   5 3 B 3   5 4 A 8   5 5 C 8
;
RUN;

PROC ANOVA DATA=PROCESS;
TITLE3 'Example #3 -- Latin Square Design';
TITLE4 '------------------------------------';
/* CLASS defines treatment(s) whose mean effects will be compared */
     CLASS BATCH DAY CATALYST;
     MODEL REACTIME = BATCH DAY CATALYST;
     MEANS BATCH DAY CATALYST / DUNCAN;
RUN;

DATA CHMPRS;
/* @@ means a loop in reading input variable sequence */
/* $ after a variable means that the variable is alphanumeric */
INPUT PRESS TEMP $ YIELD @@;
CARDS;
200 LOW    90.4  200 LOW    90.2
200 MEDIUM 90.1  200 MEDIUM 90.3
200 HIGH   90.5  200 HIGH   90.7
215 LOW    90.7  215 LOW    90.6
215 MEDIUM 90.5  215 MEDIUM 90.6
215 HIGH   90.8  215 HIGH   90.9
230 LOW    90.2  230 LOW    90.4
230 MEDIUM 89.9  230 MEDIUM 90.1
230 HIGH   90.4  230 HIGH   90.1
;
RUN;

PROC GLM DATA=CHMPRS;
TITLE3 'Example #4 -- Factorial Design - a';
TITLE4 '------------------------------------';
/* CLASS defines treatment(s) whose mean effects will be compared */
     CLASS PRESS TEMP;
     MODEL YIELD = PRESS TEMP PRESS*TEMP;
     MEANS  PRESS TEMP PRESS*TEMP / DUNCAN;
/*   MEANS  PRESS | TEMP / DUNCAN; would do the same to above line */
RUN;


DATA SURFNS;
/* @@ means a loop in reading input variable sequence */
/* $ after a variable means that the variable is alphanumeric */
INPUT DEPTH FEED FSYM $ FINISH  @@;
CARDS;
0.15 0.20 O 74  0.15 0.20 O 64  0.15 0.20 O 60
0.15 0.25 P 92  0.15 0.25 P 86  0.15 0.25 P 88
0.15 0.30 Q 99  0.15 0.30 Q 98  0.15 0.30 Q 102
0.18 0.20 O 79  0.18 0.20 O 68  0.18 0.20 O 73
0.18 0.25 P 98  0.18 0.25 P 104 0.18 0.25 P 88
0.18 0.30 Q 104 0.18 0.30 Q 99  0.18 0.30 Q 95
0.20 0.20 O 82  0.20 0.20 O 88  0.20 0.20 O 92
0.20 0.25 P 99  0.20 0.25 P 108 0.20 0.25 P 95
0.20 0.30 Q 108 0.20 0.30 Q 110 0.20 0.30 Q 99
0.25 0.20 O 99  0.25 0.20 O 104 0.25 0.20 O 96
0.25 0.25 P 104 0.25 0.25 P 110 0.25 0.25 P 99
0.25 0.30 Q 114 0.25 0.30 Q 111 0.25 0.30 Q 107
;
RUN;

PROC GLM DATA=SURFNS;
TITLE3 'Example #5 -- Factorial Design - b';
TITLE4 '------------------------------------';
/* CLASS defines treatment(s) whose mean effects will be compared */
     CLASS DEPTH FEED FSYM;
     MODEL FINISH= DEPTH FEED DEPTH*FEED;
     MEANS DEPTH FEED DEPTH*FEED / DUNCAN;
/*   MEANS DEPTH | FEED / DUNCAN; would do the same to above line */
RUN;

SAS Listing

Go back to
SAS Source Page

Return to CEE 700/800 Homepage Return to CEE 700/800 Homepage Move to the Top of this page