Example of a Full Factorial Design in Two Blocks

See FACTEXG2 in the SAS/QC Sample LibraryThe previous example illustrates a complete factorial experiment that involves eight runs and three factors: cutting speed (Speed), feed rate (FeedRate), and tool angle (Angle).

Now, suppose two machines (A and B) are used to complete the experiment, with four runs being performed on each machine. As there is the possibility that the machine affects the part finish, you should consider machine as a block factor and account for the block effect in assigning the runs to machines.

The following statements construct a blocked design:

proc factex;
   factors Speed FeedRate Angle;
   blocks nblocks=2;         
   model resolution=max;     
   examine design;
run;

The FACTORS statement in PROC FACTEX specifies three factors of a $2^3$ factorial. The BLOCKS statement specifies that the number of blocks is 2. The RESOLUTION=MAX option in the MODEL statement specifies a design with the highest resolution—that is, the best design in a general sense. Optionally, if you know the resolution of the design, you can replace RESOLUTION=MAX with RESOLUTION=r, where r is the resolution number. For information about resolution, see the section Resolution.

By default, the FACTEX procedure assumes that the size of the design is a full factorial and that each factor is at two levels.

After you submit the preceding statements, you see the following messages in the SAS log:

NOTE: No design size specified.
      Default is a full replicate in 8 runs.
NOTE: Design has 8 runs in 2 blocks of size 4,
      resolution = 6.

The output is shown in Figure 7.3. Note that, by default, the name for the block variable is BLOCK and its levels are 1 and 2. Also, note that the default factor levels for a two-level design are –1 and 1.

Figure 7.3: $2^{3}$ Factorial Design in Two Blocks before Decoding

The FACTEX Procedure

Design Points
Experiment
Number
Speed FeedRate Angle Block
1 -1 -1 -1 1
2 -1 -1 1 2
3 -1 1 -1 2
4 -1 1 1 1
5 1 -1 -1 2
6 1 -1 1 1
7 1 1 -1 1
8 1 1 1 2


You can rename the block variable and use actual levels for the block variable appropriate for your situation as follows:

proc factex;
   factors Speed FeedRate Angle;
   blocks nblocks=2;
   model resolution=max;     
   output out=BlockDesign              
     Speed    nvals=(300 500)      
     FeedRate nvals=(20 30)       
     Angle    nvals=(6 8)
     blockname=Machine cvals=('A' 'B'); 
run;                              
                                   
proc print;
run;

Figure 7.4 shows the listing of the design saved in the data set BlockDesign.

Figure 7.4: $2^{3}$ Factorial Design in Two Blocks after Decoding

Obs Machine Speed FeedRate Angle
1 A 300 20 6
2 A 300 30 8
3 A 500 20 8
4 A 500 30 6
5 B 300 20 8
6 B 300 30 6
7 B 500 20 6
8 B 500 30 8