Multi-Way ANOVA Model

Bottler Example

Program Listing

OPTIONS LS=76 PS=66 NODATE NONUMBER NOCENTER;

DATA bottler (DROP=rep);
DO carbon = 10 TO 14 BY 2;
DO pressure = 25,30;
DO speed = 200,250;
DO rep = 1 TO 2;
INPUT volume @@;
OUTPUT;
END;
END;
END;
END;
DATALINES;
7 9 9 10 9 10 11 11
10 11 12 11 12 13 16 15
15 14 17 16 17 19 20 21
;

TITLE1 'Three-Way ANOVA Model';
TITLE2 'Bottler Example';
PROC GLM DATA=bottler;
CLASS carbon pressure speed;
TITLE3 'ANOVA Table';
MODEL volume = carbon | pressure | speed;
RUN;
TITLE3 'Comparsion Between Speeds';
LSMEANS speed/CL PDIFF;
RUN;
TITLE3 'Simple Effects';
TITLE4 'of carbon within pressure';
LSMEANS carbon*pressure/SLICE=pressure;
RUN;
TITLE4 'of pressure within carbon';
LSMEANS carbon*pressure/SLICE=carbon;
RUN;
TITLE4 'pressure = 25';
ESTIMATE 'mu[11]-mu[21]' carbon 1 -1 carbon*pressure 1 0 -1;
ESTIMATE 'mu[11]-mu[31]' carbon 1 0 -1 carbon*pressure 1 0 0 0 -1;
ESTIMATE 'mu[21]-mu[31]' carbon 0 1 -1 carbon*pressure 0 0 1 0 -1;
RUN;
TITLE4 'pressure = 30';
ESTIMATE 'mu[12]-mu[22]' carbon 1 -1 carbon*pressure 0 1 0 -1;
ESTIMATE 'mu[12]-mu[32]' carbon 1 0 -1 carbon*pressure 0 1 0 0 0 -1;
ESTIMATE 'mu[22]-mu[32]' carbon 0 1 -1 carbon*pressure 0 0 0 1 0 -1;
RUN;
QUIT;
PROC GLM DATA=bottler;
CLASS carbon pressure speed;
TITLE3 'Reduced Model';
MODEL volume = carbon | pressure speed;
RUN;
TITLE4 'Orthogonal Polynomial Contrasts';
CONTRAST 'carbon[linear]' carbon -1 0 1;
CONTRAST 'carbon[quadratic]' carbon 1 -2 1;
CONTRAST 'pressure[linear]' pressure -1 1;
CONTRAST 'speed[linear]' speed -1 1;
CONTRAST 'carbon[lin] by pressure[lin]'
carbon*pressure 1 -1 0 0 -1 1;
CONTRAST 'carbon[quad] by pressure[lin]'
carbon*pressure -1 1 2 -2 -1 1;
RUN;
QUIT;

Note that, the product terms of the orthogonal polynomial contrasts are given by
carbonlin carbonquad pressurelin carbonlin×pressurelin carbonquad×pressurelin
-1 1 -1 1 -1
-1 1 1 -1 1
0 -2 -1 0 2
0 -2 1 0 -2
1 1 -1 -1 -1
1 1 1 1 1

Output Listing

Three-Way ANOVA Model
Bottler Example
ANOVA Table

The GLM Procedure

Class Level Information
Class Levels Values
carbon 3 10 12 14
pressure 2 25 30
speed 2 200 250

Number of Observations Read 24
Number of Observations Used 24



Three-Way ANOVA Model
Bottler Example
ANOVA Table

The GLM Procedure

Dependent Variable: volume
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 11 328.1250000 29.8295455 42.11 <.0001
Error 12 8.5000000 0.7083333
Corrected Total 23 336.6250000


R-Square Coeff Var Root MSE volume Mean
0.974749 6.412384 0.841625 13.12500


Source DF Type I SS Mean Square F Value Pr > F
carbon 2 252.7500000 126.3750000 178.41 <.0001
pressure 1 45.3750000 45.3750000 64.06 <.0001
carbon*pressure 2 5.2500000 2.6250000 3.71 0.0558
speed 1 22.0416667 22.0416667 31.12 0.0001
carbon*speed 2 0.5833333 0.2916667 0.41 0.6715
pressure*speed 1 1.0416667 1.0416667 1.47 0.2486
carbon*pressur*speed 2 1.0833333 0.5416667 0.76 0.4869


Source DF Type III SS Mean Square F Value Pr > F
carbon 2 252.7500000 126.3750000 178.41 <.0001
pressure 1 45.3750000 45.3750000 64.06 <.0001
carbon*pressure 2 5.2500000 2.6250000 3.71 0.0558
speed 1 22.0416667 22.0416667 31.12 0.0001
carbon*speed 2 0.5833333 0.2916667 0.41 0.6715
pressure*speed 1 1.0416667 1.0416667 1.47 0.2486
carbon*pressur*speed 2 1.0833333 0.5416667 0.76 0.4869



Three-Way ANOVA Model
Bottler Example
Comparsion Between Speeds

The GLM Procedure
Least Squares Means
H0:LSMean1=
volume LSMean2
speed LSMEAN Pr > |t|
200 12.1666667 0.0001
250 14.0833333

volume
speed LSMEAN 95% Confidence Limits
200 12.166667 11.637310 12.696023
250 14.083333 13.553977 14.612690


Least Squares Means for Effect speed

Difference
Between 95% Confidence Limits for
i j Means LSMean(i)-LSMean(j)
1 2 -1.916667 -2.665290 -1.168044



Three-Way ANOVA Model
Bottler Example
Simple Effects
of carbon within pressure

The GLM Procedure
Least Squares Means
volume
carbon pressure LSMEAN
10 25 8.7500000
10 30 10.2500000
12 25 11.0000000
12 30 14.0000000
14 25 15.5000000
14 30 19.2500000



Three-Way ANOVA Model
Bottler Example
Simple Effects
of carbon within pressure

The GLM Procedure
Least Squares Means

carbon*pressure Effect Sliced by pressure for volume

Sum of
pressure DF Squares Mean Square F Value Pr > F
25 2 94.500000 47.250000 66.71 <.0001
30 2 163.500000 81.750000 115.41 <.0001



Three-Way ANOVA Model
Bottler Example
Simple Effects
of pressure within carbon

The GLM Procedure
Least Squares Means
volume
carbon pressure LSMEAN
10 25 8.7500000
10 30 10.2500000
12 25 11.0000000
12 30 14.0000000
14 25 15.5000000
14 30 19.2500000



Three-Way ANOVA Model
Bottler Example
Simple Effects
of pressure within carbon

The GLM Procedure
Least Squares Means

carbon*pressure Effect Sliced by carbon for volume
Sum of
carbon DF Squares Mean Square F Value Pr > F
10 1 4.500000 4.500000 6.35 0.0269
12 1 18.000000 18.000000 25.41 0.0003
14 1 28.125000 28.125000 39.71 <.0001



Three-Way ANOVA Model
Bottler Example
Simple Effects
pressure = 25

The GLM Procedure

Dependent Variable: volume
Standard
Parameter Estimate Error t Value Pr > |t|
mu[11]-mu[21] -2.25000000 0.59511904 -3.78 0.0026
mu[11]-mu[31] -6.75000000 0.59511904 -11.34 <.0001
mu[21]-mu[31] -4.50000000 0.59511904 -7.56 <.0001



Three-Way ANOVA Model
Bottler Example
Simple Effects
pressure = 30

The GLM Procedure

Dependent Variable: volume
Standard
Parameter Estimate Error t Value Pr > |t|
mu[12]-mu[22] -3.75000000 0.59511904 -6.30 <.0001
mu[12]-mu[32] -9.00000000 0.59511904 -15.12 <.0001
mu[22]-mu[32] -5.25000000 0.59511904 -8.82 <.0001



Three-Way ANOVA Model
Bottler Example
Reduced Model

The GLM Procedure

Dependent Variable: volume
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 6 325.4166667 54.2361111 82.26 <.0001
Error 17 11.2083333 0.6593137
Corrected Total 23 336.6250000


R-Square Coeff Var Root MSE volume Mean
0.966704 6.186525 0.811981 13.12500


Source DF Type I SS Mean Square F Value Pr > F
carbon 2 252.7500000 126.3750000 191.68 <.0001
pressure 1 45.3750000 45.3750000 68.82 <.0001
carbon*pressure 2 5.2500000 2.6250000 3.98 0.0382
speed 1 22.0416667 22.0416667 33.43 <.0001


Source DF Type III SS Mean Square F Value Pr > F
carbon 2 252.7500000 126.3750000 191.68 <.0001
pressure 1 45.3750000 45.3750000 68.82 <.0001
carbon*pressure 2 5.2500000 2.6250000 3.98 0.0382
speed 1 22.0416667 22.0416667 33.43 <.0001



Three-Way ANOVA Model
Bottler Example
Reduced Model
Orthogonal Polynomial Contrasts

The GLM Procedure

Dependent Variable: volume
Contrast DF Contrast SS Mean Square F Value
carbon[linear] 1 248.0625000 248.0625000 376.24
carbon[quadratic] 1 4.6875000 4.6875000 7.11
pressure[linear] 1 45.3750000 45.3750000 68.82
speed[linear] 1 22.0416667 22.0416667 33.43
carbon[lin] by pressure[lin] 1 5.0625000 5.0625000 7.68
carbon[quad] by pressure[lin] 1 0.1875000 0.1875000 0.28

Contrast Pr > F
carbon[linear] <.0001
carbon[quadratic] 0.0163
pressure[linear] <.0001
speed[linear] <.0001
carbon[lin] by pressure[lin] 0.0131
carbon[quad] by pressure[lin] 0.6007