Nested Design Example An industrial firm wishes to streamline production scheduling by assigned on time standard to a particular class of machines. An experiment was designed wherein 3 machines are randomly selected and each machine is assigned to a different group of 3 operators selected at random. Each operator uses the machine 3 times at different periods during a given week. The data in certain standard units are below: Machine 1 2 3 ---------------------------------------------------------- Operator 1 2 3 1 2 3 1 2 3 ---------------------------------------------------------------------- 103.2 104.1 103.8 99.5 102.6 99.7 107.4 106.0 105.4 104.3 104.6 102.7 99.8 101.7 101.2 107.6 103.0 104.4 105.1 103.7 101.5 98.7 103.5 101.7 108.1 104.2 103.7 Are there differences in completion times among the machines? Are there differences in completion times between operators within machines? %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% title 'Nested Design: Times for Machine Operation'; options linesize = 79; data production; infile 'nested.dat'; input Machine Operator Time; PROC PRINT; PROC ANOVA; CLASS Machine Operator; # Telling SAS that Operator MODEL Time = Machine Operator(Machine); # nested within Machine PROC ANOVA; # One way to get info if we CLASS Machine Operator; # can't explicitly describe MODEL Time = Machine Operator*Machine; # nested variables PROC ANOVA; # Second way to get info if we CLASS Machine Operator; # can't explicitly describe MODEL Time = Machine Operator Operator*Machine; # nested variables RUN; Nested Design: Times for Machine Operation Obs Machine Operator Time 1 1 1 103.2 2 1 1 104.3 3 1 1 105.1 4 1 2 104.1 ... 10 2 1 99.5 11 2 1 99.8 ... 25 3 3 105.4 26 3 3 104.4 27 3 3 103.7 Nested Design: Times for Machine Operation The ANOVA Procedure Class Level Information Class Levels Values Machine 3 1 2 3 Operator 3 1 2 3 Number of observations 27 Nested Design: Times for Machine Operation The ANOVA Procedure Dependent Variable: Time Sum of Source DF Squares Mean Square F Value Pr > F Model 8 137.0007407 17.1250926 20.19 <.0001 Error 18 15.2666667 0.8481481 Corrected Total 26 152.2674074 R-Square Coeff Var Root MSE Time Mean 0.899738 0.891114 0.920950 103.3481 Source DF Anova SS Mean Square F Value Pr > F Machine 2 95.93185185 47.96592593 56.55 <.0001 Operator(Machine) 6 41.06888889 6.84481481 8.07 0.0002 Nested Design: Times for Machine Operation The ANOVA Procedure Dependent Variable: Time Sum of Source DF Squares Mean Square F Value Pr > F Model 8 137.0007407 17.1250926 20.19 <.0001 Error 18 15.2666667 0.8481481 Corrected Total 26 152.2674074 R-Square Coeff Var Root MSE Time Mean 0.899738 0.891114 0.920950 103.3481 Source DF Anova SS Mean Square F Value Pr > F Machine 2 95.93185185 47.96592593 56.55 <.0001 Machine*Operator 6 41.06888889 6.84481481 8.07 0.0002 Nested Design: Times for Machine Operation The ANOVA Procedure Dependent Variable: Time Sum of Source DF Squares Mean Square F Value Pr > F Model 8 137.0007407 17.1250926 20.19 <.0001 Error 18 15.2666667 0.8481481 Corrected Total 26 152.2674074 R-Square Coeff Var Root MSE Time Mean 0.899738 0.891114 0.920950 103.3481 Source DF Anova SS Mean Square F Value Pr > F Machine 2 95.93185185 47.96592593 56.55 <.0001 Operator 2 6.13407407 3.06703704 3.62 0.0478 Machine*Operator 4 34.93481481 8.73370370 10.30 0.0002 Here's another (but quite different way) to view the problem. Instead of thinking of the operators nested within machines, think about having 9 different operators (which is what we do have). Then, treat as a 2-factor factorial design, but it is incomplete, since each machine only has data on 3 operators. Since it's incomplete, we don't include an interaction term. title 'Nested Design: New Approach'; options linesize = 79; data production; infile 'nested1.dat'; input Machine Operator Time; PROC PRINT; PROC GLM; CLASS Machine Operator; MODEL Time = Machine Operator; RUN; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Nested Design: New Approach Obs Machine Operator Time 1 1 1 103.2 2 1 1 104.3 3 1 1 105.1 4 1 2 104.1 ... 10 2 4 99.5 11 2 4 99.8 ... 27 3 9 103.7 Nested Design: New Approach The GLM Procedure Class Level Information Class Levels Values Machine 3 1 2 3 Operator 9 1 2 3 4 5 6 7 8 9 Number of observations 27 Nested Design: New Approach The GLM Procedure Dependent Variable: Time Sum of Source DF Squares Mean Square F Value Pr > F Model 8 137.0007407 17.1250926 20.19 <.0001 Error 18 15.2666667 0.8481481 Corrected Total 26 152.2674074 R-Square Coeff Var Root MSE Time Mean 0.899738 0.891114 0.920950 103.3481 Source DF Type I SS Mean Square F Value Pr > F Machine 2 95.93185185 47.96592593 56.55 <.0001 Operator 6 41.06888889 6.84481481 8.07 0.0002 Source DF Type III SS Mean Square F Value Pr > F Machine 0 0.00000000 . . . Operator 6 41.06888889 6.84481481 8.07 0.0002