options linesize = 80 ; footnote "~john-c/5421/apples.sas &sysdate &systime" ; data apples ; length pattern $3 display $1 ; input pattern store period display sales ; datalines ; BCA 1 1 B 9 BCA 1 2 C 12 BCA 1 3 A 15 BCA 2 1 B 4 BCA 2 2 C 12 BCA 2 3 A 9 ABC 1 1 A 12 ABC 1 2 B 14 ABC 1 3 C 3 ABC 2 1 A 13 ABC 2 2 B 14 ABC 2 3 C 3 CAB 1 1 C 7 CAB 1 2 A 18 CAB 1 3 B 6 CAB 2 1 C 5 CAB 2 2 A 20 CAB 2 3 B 4 ; proc glm data = apples ; class pattern display store period ; model sales = display period pattern store(pattern) / solution ; title1 '3-Period Crossover: Data on Apple Sales' ; title2 'From Table 28.11, p. 1200, Kutner Neter Nachsheim & Li' ; title3 'Applied Linear Statistical Models, 5th Edition, McGraw-Hill, 2005' ; run ; 3-Period Crossover: Data on Apple Sales 1 From Table 28.11, p. 1200, Kutner Neter Nachsheim & Li Applied Linear Statistical Models, 5th Edition, McGraw-Hill, 2005 11:59 Thursday, April 21, 2011 The GLM Procedure Class Level Information Class Levels Values pattern 3 ABC BCA CAB display 3 A B C store 2 1 2 period 3 1 2 3 Number of observations 18 3-Period Crossover: Data on Apple Sales 2 From Table 28.11, p. 1200, Kutner Neter Nachsheim & Li Applied Linear Statistical Models, 5th Edition, McGraw-Hill, 2005 11:59 Thursday, April 21, 2011 The GLM Procedure Dependent Variable: sales Sum of Source DF Squares Mean Square F Value Pr > F Model 9 443.6666667 49.2962963 19.40 0.0002 Error 8 20.3333333 2.5416667 Corrected Total 17 464.0000000 R-Square Coeff Var Root MSE sales Mean 0.956178 15.94261 1.594261 10.00000 Source DF Type I SS Mean Square F Value Pr > F display 2 189.0000000 94.5000000 37.18 <.0001 period 2 233.3333333 116.6666667 45.90 <.0001 pattern 2 0.3333333 0.1666667 0.07 0.9370 store(pattern) 3 21.0000000 7.0000000 2.75 0.1120 Source DF Type III SS Mean Square F Value Pr > F display 2 189.0000000 94.5000000 37.18 <.0001 period 2 233.3333333 116.6666667 45.90 <.0001 pattern 2 0.3333333 0.1666667 0.07 0.9370 store(pattern) 3 21.0000000 7.0000000 2.75 0.1120 Standard Parameter Estimate Error t Value Pr > |t| Intercept 3.333333333 B 1.18829165 2.81 0.0230 display A 7.500000000 B 0.92044675 8.15 <.0001 display B 1.500000000 B 0.92044675 1.63 0.1418 display C 0.000000000 B . . . period 1 1.666666667 B 0.92044675 1.81 0.1078 period 2 8.333333333 B 0.92044675 9.05 <.0001 period 3 0.000000000 B . . . pattern ABC 0.333333333 B 1.30170828 0.26 0.8044 pattern BCA -1.333333333 B 1.30170828 -1.02 0.3357 pattern CAB 0.000000000 B . . . store(pattern) 1 ABC -0.333333333 B 1.30170828 -0.26 0.8044 store(pattern) 2 ABC 0.000000000 B . . . store(pattern) 1 BCA 3.666666667 B 1.30170828 2.82 0.0226 store(pattern) 2 BCA 0.000000000 B . . . store(pattern) 1 CAB 0.666666667 B 1.30170828 0.51 0.6224 ~john-c/5421/apples.sas 21APR11 11:59 3-Period Crossover: Data on Apple Sales 3 From Table 28.11, p. 1200, Kutner Neter Nachsheim & Li Applied Linear Statistical Models, 5th Edition, McGraw-Hill, 2005 11:59 Thursday, April 21, 2011 The GLM Procedure Dependent Variable: sales Standard Parameter Estimate Error t Value Pr > |t| store(pattern) 2 CAB 0.000000000 B . . . NOTE: The X'X matrix has been found to be singular, and a generalized inverse was used to solve the normal equations. Terms whose estimates are followed by the letter 'B' are not uniquely estimable.