The ANOVA Procedure

Example 26.2 Alternative Multiple Comparison Procedures

(View the complete code for this example.)

The following is a continuation of the first example in the section One-Way Layout with Means Comparisons. You are studying the effect of bacteria on the nitrogen content of red clover plants, and the analysis of variance shows a highly significant effect. The following statements create the data set and compute the analysis of variance as well as Tukey’s multiple comparisons test for pairwise differences between bacteria strains; the results are shown in Figure 26.1, Figure 26.2, and Figure 26.4.

title1 'Nitrogen Content of Red Clover Plants';
data Clover;
   input Strain $ Nitrogen @@;
   datalines;
3DOK1  19.4 3DOK1  32.6 3DOK1  27.0 3DOK1  32.1 3DOK1  33.0
3DOK5  17.7 3DOK5  24.8 3DOK5  27.9 3DOK5  25.2 3DOK5  24.3
3DOK4  17.0 3DOK4  19.4 3DOK4   9.1 3DOK4  11.9 3DOK4  15.8
3DOK7  20.7 3DOK7  21.0 3DOK7  20.5 3DOK7  18.8 3DOK7  18.6
3DOK13 14.3 3DOK13 14.4 3DOK13 11.8 3DOK13 11.6 3DOK13 14.2
COMPOS 17.3 COMPOS 19.4 COMPOS 19.1 COMPOS 16.9 COMPOS 20.8
;
proc anova data=Clover;
   class Strain;
   model Nitrogen = Strain;
   means Strain / tukey;
run;

The interactivity of PROC ANOVA enables you to submit further MEANS statements without re-running the entire analysis. For example, the following command requests means of the Strain levels with Duncan’s multiple range test and the Waller-Duncan k-ratio t test.

   means Strain / duncan waller;
run;

Results of the Waller-Duncan k-ratio t test are shown in Output 26.2.1.

Output 26.2.1: Waller-Duncan K-ratio t Test

Nitrogen Content of Red Clover Plants

The ANOVA Procedure
 
Waller-Duncan K-ratio t Test for Nitrogen


Note:This test minimizes the Bayes risk under additive loss and certain other assumptions.

Kratio100
Error Degrees of Freedom24
Error Mean Square11.78867
F Value14.37
Critical Value of t1.91873
Minimum Significant Difference4.1665


anox15aa

The Waller-Duncan k-ratio t test is a multiple range test. Unlike Tukey’s test, this test does not operate on the principle of controlling Type I error. Instead, it compares the Type I and Type II error rates based on Bayesian principles (Steel and Torrie 1980).

The Waller Grouping column in Output 26.2.1 shows which means are significantly different. From this test, you can conclude the following:

  • The mean nitrogen content for strain 3DOK1 is higher than the means for all other strains.

  • The mean nitrogen content for strain 3DOK5 is higher than the means for COMPOS, 3DOK4, and 3DOK13.

  • The mean nitrogen content for strain 3DOK7 is higher than the means for 3DOK4 and 3DOK13.

  • The mean nitrogen content for strain COMPOS is higher than the mean for 3DOK13.

  • Differences between all other means are not significant based on this sample size.

Output 26.2.2 shows the results of Duncan’s multiple range test. Duncan’s test is a result-guided test that compares the treatment means while controlling the comparison-wise error rate. You should use this test for planned comparisons only (Steel and Torrie 1980). The results and conclusions for this example are the same as for the Waller-Duncan k-ratio t test. This is not always the case.

Output 26.2.2: Duncan’s Multiple Range Test

Nitrogen Content of Red Clover Plants

The ANOVA Procedure
 
Duncan's Multiple Range Test for Nitrogen


Note:This test controls the Type I comparisonwise error rate, not the experimentwise error rate.

Alpha0.05
Error Degrees of Freedom24
Error Mean Square11.78867

Number of Means23456
Critical Range4.4824.7074.8524.9545.031


anox15bb

Tukey and Least Significant Difference (LSD) tests are requested with the following MEANS statement. The CLDIFF option requests confidence intervals for both tests.

   means Strain/ lsd tukey cldiff ;
run;

The LSD tests for this example are shown in Output 26.2.3, and they give the same results as the previous two multiple comparison tests. Again, this is not always the case.

Output 26.2.3: T Tests (LSD)

Nitrogen Content of Red Clover Plants

The ANOVA Procedure
 
t Tests (LSD) for Nitrogen

Alpha0.05
Error Degrees of Freedom24
Error Mean Square11.78867
Critical Value of t2.06390
Least Significant Difference4.4818

Comparisons significant at the 0.05 level are indicated by ***.
Strain
Comparison
Difference
Between
Means
95% Confidence Limits 
3DOK1 - 3DOK54.8400.3589.322***
3DOK1 - 3DOK78.9004.41813.382***
3DOK1 - COMPOS10.1205.63814.602***
3DOK1 - 3DOK414.1809.69818.662***
3DOK1 - 3DOK1315.56011.07820.042***
3DOK5 - 3DOK1-4.840-9.322-0.358***
3DOK5 - 3DOK74.060-0.4228.542 
3DOK5 - COMPOS5.2800.7989.762***
3DOK5 - 3DOK49.3404.85813.822***
3DOK5 - 3DOK1310.7206.23815.202***
3DOK7 - 3DOK1-8.900-13.382-4.418***
3DOK7 - 3DOK5-4.060-8.5420.422 
3DOK7 - COMPOS1.220-3.2625.702 
3DOK7 - 3DOK45.2800.7989.762***
3DOK7 - 3DOK136.6602.17811.142***
COMPOS - 3DOK1-10.120-14.602-5.638***
COMPOS - 3DOK5-5.280-9.762-0.798***
COMPOS - 3DOK7-1.220-5.7023.262 
COMPOS - 3DOK44.060-0.4228.542 
COMPOS - 3DOK135.4400.9589.922***
3DOK4 - 3DOK1-14.180-18.662-9.698***
3DOK4 - 3DOK5-9.340-13.822-4.858***
3DOK4 - 3DOK7-5.280-9.762-0.798***
3DOK4 - COMPOS-4.060-8.5420.422 
3DOK4 - 3DOK131.380-3.1025.862 
3DOK13 - 3DOK1-15.560-20.042-11.078***
3DOK13 - 3DOK5-10.720-15.202-6.238***
3DOK13 - 3DOK7-6.660-11.142-2.178***
3DOK13 - COMPOS-5.440-9.922-0.958***
3DOK13 - 3DOK4-1.380-5.8623.102 


If you only perform the LSD tests when the overall model F test is significant, then this is called Fisher’s protected LSD test. Note that the LSD tests should be used for planned comparisons.

The TUKEY tests shown in Output 26.2.4 find fewer significant differences than the other three tests. This is not unexpected, as the TUKEY test controls the Type I experimentwise error rate. For a complete discussion of multiple comparison methods, see the section Multiple Comparisons in Chapter 48: The GLM Procedure.

Output 26.2.4: Tukey’s Studentized Range Test

Alpha0.05
Error Degrees of Freedom24
Error Mean Square11.78867
Critical Value of Studentized Range4.37265
Minimum Significant Difference6.7142

Comparisons significant at the 0.05 level are indicated by ***.
Strain
Comparison
Difference
Between
Means
Simultaneous 95% Confidence
Limits
 
3DOK1 - 3DOK54.840-1.87411.554 
3DOK1 - 3DOK78.9002.18615.614***
3DOK1 - COMPOS10.1203.40616.834***
3DOK1 - 3DOK414.1807.46620.894***
3DOK1 - 3DOK1315.5608.84622.274***
3DOK5 - 3DOK1-4.840-11.5541.874 
3DOK5 - 3DOK74.060-2.65410.774 
3DOK5 - COMPOS5.280-1.43411.994 
3DOK5 - 3DOK49.3402.62616.054***
3DOK5 - 3DOK1310.7204.00617.434***
3DOK7 - 3DOK1-8.900-15.614-2.186***
3DOK7 - 3DOK5-4.060-10.7742.654 
3DOK7 - COMPOS1.220-5.4947.934 
3DOK7 - 3DOK45.280-1.43411.994 
3DOK7 - 3DOK136.660-0.05413.374 
COMPOS - 3DOK1-10.120-16.834-3.406***
COMPOS - 3DOK5-5.280-11.9941.434 
COMPOS - 3DOK7-1.220-7.9345.494 
COMPOS - 3DOK44.060-2.65410.774 
COMPOS - 3DOK135.440-1.27412.154 
3DOK4 - 3DOK1-14.180-20.894-7.466***
3DOK4 - 3DOK5-9.340-16.054-2.626***
3DOK4 - 3DOK7-5.280-11.9941.434 
3DOK4 - COMPOS-4.060-10.7742.654 
3DOK4 - 3DOK131.380-5.3348.094 
3DOK13 - 3DOK1-15.560-22.274-8.846***
3DOK13 - 3DOK5-10.720-17.434-4.006***
3DOK13 - 3DOK7-6.660-13.3740.054 
3DOK13 - COMPOS-5.440-12.1541.274 
3DOK13 - 3DOK4-1.380-8.0945.334 


Last updated: February 13, 2019