Data from Table 21.1, page 466.
data table21_1; input a b c recall @@; datalines; 1 1 1 7 2 1 1 6 3 1 1 10 1 1 1 7 2 1 1 8 3 1 1 8 1 1 1 9 2 1 1 7 3 1 1 8 1 1 1 10 2 1 1 9 3 1 1 6 1 1 1 9 2 1 1 9 3 1 1 8 1 2 1 7 2 2 1 6 3 2 1 7 1 2 1 8 2 2 1 8 3 2 1 7 1 2 1 9 2 2 1 8 3 2 1 6 1 2 1 10 2 2 1 9 3 2 1 9 1 2 1 10 2 2 1 9 3 2 1 9 1 3 1 7 2 3 1 3 3 3 1 2 1 3 1 7 2 3 1 5 3 3 1 3 1 3 1 10 2 3 1 3 3 3 1 4 1 3 1 7 2 3 1 6 3 3 1 5 1 3 1 9 2 3 1 5 3 3 1 5 1 1 2 10 2 1 2 6 3 1 2 9 1 1 2 8 2 1 2 9 3 1 2 10 1 1 2 9 2 1 2 8 3 1 2 7 1 1 2 7 2 1 2 7 3 1 2 7 1 1 2 8 2 1 2 10 3 1 2 9 1 2 2 7 2 2 2 6 3 2 2 8 1 2 2 8 2 2 2 7 3 2 2 8 1 2 2 9 2 2 2 9 3 2 2 6 1 2 2 9 2 2 2 9 3 2 2 9 1 2 2 11 2 2 2 10 3 2 2 9 1 3 2 6 2 3 2 6 3 3 2 6 1 3 2 7 2 3 2 8 3 3 2 5 1 3 2 8 2 3 2 6 3 3 2 7 1 3 2 9 2 3 2 9 3 3 2 8 1 3 2 9 2 3 2 8 3 3 2 9 ; run;
Simple Effects and Simple Contrasts, page 494.
proc glm data= table21_1;
class a b c;
model recall = a|b|c/ss3;
contrast ' a1 vs (a2 & a3) @ b3 c1'
a 1 -.5 -.5
b 0 0 0
c 0 0
a*b 0 0 1
0 0 -.5
0 0 -.5
a*c 1 0
-.5 0
-.5 0
b*c 0 0
0 0
0 0
a*b*c 0 0
0 0
1 0
0 0
0 0
-.5 0
0 0
0 0
-.5 0;
run; quit;
Class Level Information
Class Levels Values
a 3 1 2 3
b 3 1 2 3
c 2 1 2
Number of observations 90
Dependent Variable: recall
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 17 155.6000000 9.1529412 4.85 <.0001
Error 72 136.0000000 1.8888889
Corrected Total 89 291.6000000
R-Square Coeff Var Root MSE recall Mean
0.533608 18.08380 1.374369 7.600000
Source DF Type III SS Mean Square F Value Pr > F
a 2 26.86666667 13.43333333 7.11 0.0015
b 2 64.86666667 32.43333333 17.17 <.0001
a*b 4 14.66666667 3.66666667 1.94 0.1128
c 1 14.40000000 14.40000000 7.62 0.0073
a*c 2 8.60000000 4.30000000 2.28 0.1100
b*c 2 16.20000000 8.10000000 4.29 0.0174
a*b*c 4 10.00000000 2.50000000 1.32 0.2695
Contrast DF Contrast SS Mean Square F Value Pr > F
a1 vs (a2 & a3) @ b3 c1 1 50.70000000 50.70000000 26.84 <.0001
Main Effect Contrasts, page 496.
proc glm data = table21_1; class a b c; model recall = a|b|c /ss3; contrast 'a1 vs (a2 and a3)' a -1 .5 .5; run; quit;
Class Level Information
Class Levels Values
a 3 1 2 3
b 3 1 2 3
c 2 1 2
Number of observations 90
Dependent Variable: recall
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 17 155.6000000 9.1529412 4.85 <.0001
Error 72 136.0000000 1.8888889
Corrected Total 89 291.6000000
R-Square Coeff Var Root MSE recall Mean
0.533608 18.08380 1.374369 7.600000
Source DF Type III SS Mean Square F Value Pr > F
a 2 26.86666667 13.43333333 7.11 0.0015
b 2 64.86666667 32.43333333 17.17 <.0001
a*b 4 14.66666667 3.66666667 1.94 0.1128
c 1 14.40000000 14.40000000 7.62 0.0073
a*c 2 8.60000000 4.30000000 2.28 0.1100
b*c 2 16.20000000 8.10000000 4.29 0.0174
a*b*c 4 10.00000000 2.50000000 1.32 0.2695
Contrast DF Contrast SS Mean Square F Value Pr > F
a1 vs (a2 and a3) 1 26.45000000 26.45000000 14.00 0.0004
Simple effects based on marginal two-way tables, page 497.
proc glm data = table21_1; class a b c; model recall = a|b|c /ss3; lsmeans b*c/ slice = c; run; quit;
Class Level Information
Class Levels Values
a 3 1 2 3
b 3 1 2 3
c 2 1 2
Number of observations 90
Dependent Variable: recall
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 17 155.6000000 9.1529412 4.85 <.0001
Error 72 136.0000000 1.8888889
Corrected Total 89 291.6000000
R-Square Coeff Var Root MSE recall Mean
0.533608 18.08380 1.374369 7.600000
Source DF Type III SS Mean Square F Value Pr > F
a 2 26.86666667 13.43333333 7.11 0.0015
b 2 64.86666667 32.43333333 17.17 <.0001
a*b 4 14.66666667 3.66666667 1.94 0.1128
c 1 14.40000000 14.40000000 7.62 0.0073
a*c 2 8.60000000 4.30000000 2.28 0.1100
b*c 2 16.20000000 8.10000000 4.29 0.0174
a*b*c 4 10.00000000 2.50000000 1.32 0.2695
Least Squares Means
recall
b c LSMEAN
1 1 8.06666667
1 2 8.26666667
2 1 8.13333333
2 2 8.33333333
3 1 5.40000000
3 2 7.40000000
Least Squares Means
b*c Effect Sliced by c for recall
Sum of
c DF Squares Mean Square F Value Pr > F
1 2 72.933333 36.466667 19.31 <.0001
2 2 8.133333 4.066667 2.15 0.1236
Three-way interaction contrast, page 502-503.
proc glm data= table21_1;
class a b c;
model recall = a|b|c /ss3;
contrast ' ' a*b*c
0 0
1 -1
-1 1
0 0
-.5 .5
.5 -.5
0 0
-.5 .5
.5 -.5
;
run; quit;
Class Level Information
Class Levels Values
a 3 1 2 3
b 3 1 2 3
c 2 1 2
Number of observations 90
Dependent Variable: recall
Sum of
Source DF Squares Mean Square F Value Pr > F
Model 17 155.6000000 9.1529412 4.85 <.0001
Error 72 136.0000000 1.8888889
Corrected Total 89 291.6000000
R-Square Coeff Var Root MSE recall Mean
0.533608 18.08380 1.374369 7.600000
Source DF Type III SS Mean Square F Value Pr > F
a 2 26.86666667 13.43333333 7.11 0.0015
b 2 64.86666667 32.43333333 17.17 <.0001
a*b 4 14.66666667 3.66666667 1.94 0.1128
c 1 14.40000000 14.40000000 7.62 0.0073
a*c 2 8.60000000 4.30000000 2.28 0.1100
b*c 2 16.20000000 8.10000000 4.29 0.0174
a*b*c 4 10.00000000 2.50000000 1.32 0.2695
Contrast DF Contrast SS Mean Square F Value Pr > F
1 7.50000000 7.50000000 3.97 0.0501
