**********************************************************; * Balanced Incomplete Block designs * * In general, a two-way layout with n blocks and k treatment groups * is an INCOMPLETE BLOCK DESIGN (IBD) if it has cells with no data * It is a BALANCED INCOMPLETE BLOCK DESIGN (BIBD) if there exist * constants s, p, and lambda such that * (i) each block has values for s treatments * (ii) each treatment group has values for p blocks * (iii) each PAIR of treatments shares exactly lamba values * (iv) p*(s-1) = lambda*(k-1) * * A common source for BIBDs is situations in which k treatments * are to be compared, but only s0 then output; end; datalines; 1 73 74 -1 71 2 -1 75 67 72 3 73 75 68 -1 4 75 -1 72 75 run; proc print; title6 'THE DATA AS SAS SEES IT'; run; title3 'MEANS FOR EACH LEVEL OF CATALYST and BLOCK'; title4 'This also checks the number of observations for each'; proc means mean stddev maxdec=2; class Catalyst; var Yield; run; proc means mean stddev maxdec=2; class Block; var Yield; run; title2 'TEST CATALYST, AFTER ALLOWING FOR BLOCKS'; title3 'Catalyst has a moderately significant effect (P=0.0107)'; proc glm; classes Catalyst Block; model Yield = Block Catalyst; run; title2 'TEST BLOCKS, AFTER ALLOWING FOR CATALYST'; title3 'Block has a highly significant effect (P=0.0010)'; proc glm; classes Catalyst Block; model Yield = Catalyst Block; run; title1 'A SECOND BIBD DESIGN (ALSO A YOUDEN SQUARE) - YOUR NAME'; title2 'Here n=k=7, s=p=4, and la=2 in the definition of BIBD'; title3 'A second Blocking variable is indicated by Greek letters'; title4 'From text (Box-Hunter-Hunter) Table 4.15 p165'; data bibd2; input Cycle$ @@; do Column=1 to 4; input Yy Treat$ Position$ @@; output; end; datalines; C1 627 B al 248 D be 563 F ga 252 G de C2 344 A al 233 C be 442 F de 226 G ga C3 251 C al 211 D ga 160 E de 297 G be C4 337 A be 537 B de 195 E ga 300 G al C5 520 B ga 278 C de 199 E be 595 F al C6 369 A ga 196 D de 185 E al 606 F be C7 396 A de 602 B be 240 C ga 273 D al run; proc print; title5 'THE DATA AS SAS SEES IT'; run; title3 'MEANS FOR EACH LEVEL OF TREAT, CYCLE, and POSITION'; title4 'This also checks the number of observations for each'; proc means mean stddev maxdec=2 data=bibd2; class Treat; var Yy; run; proc means mean stddev maxdec=2 data=bibd2; class Cycle; var Yy; run; proc means mean stddev maxdec=2 data=bibd2; class Position; var Yy; run; title3 'ANOVA ANALYSIS AS A BIBD FOR CYCLE AND TREATMENT'; proc glm data=bibd2; classes Cycle Treat; model Yy=Cycle Treat; run; title3 'ANOVA ANALYSIS AS A YOUDEN SQUARE FOR CYCLE, POSITION, and TREATMENT'; proc glm data=bibd2; classes Cycle Position Treat; model Yy=Cycle Position Treat; run; title3 'ANOVA ANALYSIS AS A YOUDEN SQUARE FOR CYCLE, TREATMENT, and POSITION'; title4 'Note that the F-stats and P-values for Treat and Posn are unchanged'; proc glm data=bibd2; classes Cycle Treat Position; model Yy=Cycle Treat Position; run;