/* Two-way ANOVA with MULTIPLE COMPARISONS on INTERACTIONS */ OPTIONS LS=75 PS=55 NODATE PAGENO=1; DATA one; INPUT height $ width $ sales; DATALINES; Bottom Regular 47 Bottom Regular 43 Bottom Wide 46 Bottom Wide 40 Middle Regular 62 Middle Regular 68 Middle Wide 67 Middle Wide 71 Top Regular 41 Top Regular 39 Top Wide 42 Top Wide 46 ; PROC GLM; CLASS height width; MODEL sales = height width height*width; LSMEANS height width height*width / ADJUST=BON; RUN; QUIT; *************************************************************************** Two-way ANOVA With Interaction 1 The GLM Procedure Class Level Information Class Levels Values height 3 Bottom Middle Top width 2 Regular Wide Number of Observations Read 12 Number of Observations Used 12 Two-way ANOVA With Interaction 2 The GLM Procedure Dependent Variable: sales Sum of Source DF Squares Mean Square F Value Pr > F Model 5 1580.000000 316.000000 30.58 0.0003 Error 6 62.000000 10.333333 Corrected Total 11 1642.000000 R-Square Coeff Var Root MSE sales Mean 0.962241 6.303040 3.214550 51.00000 Source DF Type I SS Mean Square F Value Pr > F height 2 1544.000000 772.000000 74.71 <.0001 width 1 12.000000 12.000000 1.16 0.3226 height*width 2 24.000000 12.000000 1.16 0.3747 Source DF Type III SS Mean Square F Value Pr > F height 2 1544.000000 772.000000 74.71 <.0001 width 1 12.000000 12.000000 1.16 0.3226 height*width 2 24.000000 12.000000 1.16 0.3747 Two-way ANOVA With Interaction 3 The GLM Procedure Least Squares Means Adjustment for Multiple Comparisons: Bonferroni LSMEAN height sales LSMEAN Number Bottom 44.0000000 1 Middle 67.0000000 2 Top 42.0000000 3 Least Squares Means for effect height Pr > |t| for H0: LSMean(i)=LSMean(j) Dependent Variable: sales i/j 1 2 3 1 0.0002 1.0000 2 0.0002 0.0001 3 1.0000 0.0001 Two-way ANOVA With Interaction 4 The GLM Procedure Least Squares Means Adjustment for Multiple Comparisons: Bonferroni H0:LSMean1= LSMean2 width sales LSMEAN Pr > |t| Regular 50.0000000 0.3226 Wide 52.0000000 Two-way ANOVA With Interaction 5 The GLM Procedure Least Squares Means Adjustment for Multiple Comparisons: Bonferroni LSMEAN height width sales LSMEAN Number Bottom Regular 45.0000000 1 Bottom Wide 43.0000000 2 Middle Regular 65.0000000 3 Middle Wide 69.0000000 4 Top Regular 40.0000000 5 Top Wide 44.0000000 6 Least Squares Means for effect height*width Pr > |t| for H0: LSMean(i)=LSMean(j) Dependent Variable: sales i/j 1 2 3 4 5 6 1 1.0000 0.0119 0.0045 1.0000 1.0000 2 1.0000 0.0072 0.0029 1.0000 1.0000 3 0.0119 0.0072 1.0000 0.0036 0.0092 4 0.0045 0.0029 1.0000 0.0016 0.0036 5 1.0000 1.0000 0.0036 0.0016 1.0000 6 1.0000 1.0000 0.0092 0.0036 1.0000