See FACTEX7B in the SAS/QC Sample LibrarySeveral important series of balanced incomplete block designs can be derived from orthogonal factorial designs. One is the series of balanced lattices of Yates (1936); refer to page 396 of Cochran and Cox (1957). In a balanced lattice, the number of treatments v must be the square of a power of a prime number: , where p is a prime number. These designs are based on a complete set of q – 1 mutually orthogonal Latin squares, which is equivalent to a resolution 3 design for q + 1 q-level factors in runs.
The balanced lattice designs include q + 1 replicates of the treatments. They are constructed by associating each treatment with a run in the factorial design, each replicate with one of the factors, and each block with one of the q values of that factor. For example, the treatments in Block 3 within Replicate 2 are those treatments that are associated with runs for which factor 2 is set at value 3.
The following statements use this method to construct a balanced lattice design for 16 treatments in five replicates of four blocks each. The construction procedure is based on a resolution 3 design for five 4-level factors in 16 runs.
proc factex; factors x1-x5 / nlev=4; size design=16; model r=3; output out=a; run;
In the following DATA step, the incomplete block design is built by using the design saved in the data set a
by the FACTEX procedure:
data b; keep Rep Block Plot t; array x{5} x1-x5; do Rep = 1 to 5; do Block = 1 to 4; Plot = 0; do n = 1 to 16; set a point=n; if (x{rep}=Block-1) then do; t = n; Plot = Plot + 1; output; end; end; end; end; stop; run;
For each block within each replicate, the program loops through the run numbers in the factorial design and chooses those
that have the Rep
th factor equal to Block
–1. These run numbers are the treatments that go into the particular block.
The design is printed by using a DATA step. Each block of each replicate is built into the variables S1, S2, S3, and S4, and each block is printed with a PUT statement.
data _null_; array s{4} s1-s4; file print; n = 1; do r = 1 to 5; put "Replication " r 1.0 ":"; do b = 1 to 4; do p = 1 to 4; set b point=n; s{Plot} = t; n = n+1; end; put " Block " b 1.0 ":" (s1-s4) (3.0); end; put; end; stop; run;
The ARRAY statement creates a buffer for holding each block, and the FILE statement directs the printing to output screen. The design is displayed in Output 7.13.1.
You can use the PLAN procedure to randomize the block design, as shown by the following statements:
proc plan seed=54321; factors Rep=5 Block=4 Plot=4 / noprint; output data=b out=c; run; proc sort; by Rep Block Plot; run;
The variable Plot
indexes the plots within each block. Refer to the
SAS/STAT User's Guide for a general discussion of randomizing block designs.
Finally, substitute set c for set b in the preceding DATA step. Running this DATA step creates the randomized design displayed in Output 7.13.2.
Output 7.13.1: A Balanced Lattice
Replication 1: Block 1: 1 2 3 4 Block 2: 5 6 7 8 Block 3: 9 10 11 12 Block 4: 13 14 15 16 Replication 2: Block 1: 1 5 9 13 Block 2: 2 6 10 14 Block 3: 3 7 11 15 Block 4: 4 8 12 16 Replication 3: Block 1: 1 6 11 16 Block 2: 3 8 9 14 Block 3: 4 7 10 13 Block 4: 2 5 12 15 Replication 4: Block 1: 1 8 10 15 Block 2: 3 6 12 13 Block 3: 4 5 11 14 Block 4: 2 7 9 16 Replication 5: Block 1: 1 7 12 14 Block 2: 3 5 10 16 Block 3: 4 6 9 15 Block 4: 2 8 11 13 |
Output 7.13.2: Randomized Design
Replication 1: Block 1: 15 5 2 12 Block 2: 3 8 9 14 Block 3: 16 1 11 6 Block 4: 7 10 13 4 Replication 2: Block 1: 2 4 3 1 Block 2: 5 7 8 6 Block 3: 9 11 10 12 Block 4: 15 16 13 14 Replication 3: Block 1: 2 13 8 11 Block 2: 14 12 7 1 Block 3: 15 4 9 6 Block 4: 5 16 3 10 Replication 4: Block 1: 13 1 5 9 Block 2: 14 2 10 6 Block 3: 11 15 3 7 Block 4: 16 12 4 8 Replication 5: Block 1: 2 16 7 9 Block 2: 15 10 8 1 Block 3: 3 12 6 13 Block 4: 5 11 14 4 |