Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The PLAN Procedure

Example 50.4: A Latin Square Design

All of the preceding examples involve designs with completely nested block structures, for which PROC PLAN was especially designed. However, by appropriate coordination of its facilities, a much wider class of designs can be accommodated. A Latin square design is based on experimental units that have a row-and-column block structure. The following example uses the CYCLIC option for a treatment factor tmts to generate a simple 4 ×4 Latin square. Randomizing a Latin square design involves randomly permuting the row, column, and treatment values independently. In order to do this, use the RANDOM option in the OUTPUT statement of PROC PLAN. The example also uses factor-value-settings in the OUTPUT statement. The following statements produce Output 50.4.1:

   title 'Latin Square Design';
   proc plan seed=37430;
      factors rows=4 ordered cols=4 ordered / noprint;
      treatments tmts=4 cyclic;
      output out=g
             rows cvals=('Day 1' 'Day 2' 'Day 3' 'Day 4') random
             cols cvals=('Lab 1' 'Lab 2' 'Lab 3' 'Lab 4') random
             tmts nvals=(   0      100     250     450  ) random;
   quit;

   proc tabulate;
      class rows cols;
      var tmts;
      table rows, cols*(tmts*f=6.) / rts=8;
   run;

Output 50.4.1: A Randomized Latin Square Design

Latin Square Design

  cols
Lab 1 Lab 2 Lab 3 Lab 4
tmts tmts tmts tmts
Sum Sum Sum Sum
rows 0 250 100 450
Day 1
Day 2 250 450 0 100
Day 3 100 0 450 250
Day 4 450 100 250 0

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.