/* This program will randomly select a four-by-four Latin square for the tire wear experiment discussed in class. The numbers 1 through 4 in the final table correspond to the four methods of tire construction. */ proc plan; /* seed=435; */ factors car=4 ordered position=4 ordered / noprint; treatments treat=4 cyclic; output out=one car cvals=('car 1' 'car 2' 'car 3' 'car 4') random position cvals=('left front' 'right front' 'left rear' 'right rear') random treat nvals=(1 2 3 4) random; run; proc print; run; proc tabulate; class car position; var treat; table car, position*(treat*f=6.) / rts=8; run;