* flour.sas, flour experiment, Table 15.16, p514; ; * Data as in Table 15.16, and create factor variables; data flour; input block TC \$ y A1 A2 A1A2 N S Q T; * create factor A; temp=substr(TC,1,2); drop temp; if temp='00' then A=0; else if temp='01' then A=1; else if temp='10' then A=2; else if temp='11' then A=3; * create factors NN, NS, NQ, NT for the noise * factors N, S, Q and T, respectively; NN=substr(TC,3,1); NS=substr(TC,4,1); NQ=substr(TC,5,1); NT=substr(TC,6,1); lines; 1 000011 436 -1 -1 1 -1 -1 1 1 1 000110 507 -1 -1 1 -1 1 1 -1 1 001001 434 -1 -1 1 1 -1 -1 1 1 001100 508 -1 -1 1 1 1 -1 -1 1 010010 436 -1 1 -1 -1 -1 1 -1 1 010111 508 -1 1 -1 -1 1 1 1 1 011000 404 -1 1 -1 1 -1 -1 -1 1 011101 510 -1 1 -1 1 1 -1 1 1 100010 440 1 -1 -1 -1 -1 1 -1 1 100111 517 1 -1 -1 -1 1 1 1 1 101000 442 1 -1 -1 1 -1 -1 -1 1 101101 501 1 -1 -1 1 1 -1 1 1 110011 458 1 1 1 -1 -1 1 1 1 110110 536 1 1 1 -1 1 1 -1 1 111001 464 1 1 1 1 -1 -1 1 1 111100 532 1 1 1 1 1 -1 -1 2 000000 567 -1 -1 1 -1 -1 -1 -1 2 000101 549 -1 -1 1 -1 1 -1 1 2 001010 391 -1 -1 1 1 -1 1 -1 2 001111 418 -1 -1 1 1 1 1 1 2 010001 458 -1 1 -1 -1 -1 -1 1 2 010100 499 -1 1 -1 -1 1 -1 -1 2 011011 381 -1 1 -1 1 -1 1 1 2 011110 451 -1 1 -1 1 1 1 -1 2 100001 499 1 -1 -1 -1 -1 -1 1 2 100100 483 1 -1 -1 -1 1 -1 -1 2 101011 368 1 -1 -1 1 -1 1 1 2 101110 456 1 -1 -1 1 1 1 -1 2 110000 475 1 1 1 -1 -1 -1 -1 2 110101 597 1 1 1 -1 1 -1 1 2 111010 414 1 1 1 1 -1 1 -1 2 111111 452 1 1 1 1 1 1 1 ; * Data including factor levels; data flour; input block TC \$ y A1 A2 A1A2 N S Q T A NN NS NQ NT; lines; 1 000011 436 -1 -1 1 -1 -1 1 1 0 0 0 1 1 1 000110 507 -1 -1 1 -1 1 1 -1 0 0 1 1 0 1 001001 434 -1 -1 1 1 -1 -1 1 0 1 0 0 1 1 001100 508 -1 -1 1 1 1 -1 -1 0 1 1 0 0 1 010010 436 -1 1 -1 -1 -1 1 -1 1 0 0 1 0 1 010111 508 -1 1 -1 -1 1 1 1 1 0 1 1 1 1 011000 404 -1 1 -1 1 -1 -1 -1 1 1 0 0 0 1 011101 510 -1 1 -1 1 1 -1 1 1 1 1 0 1 1 100010 440 1 -1 -1 -1 -1 1 -1 2 0 0 1 0 1 100111 517 1 -1 -1 -1 1 1 1 2 0 1 1 1 1 101000 442 1 -1 -1 1 -1 -1 -1 2 1 0 0 0 1 101101 501 1 -1 -1 1 1 -1 1 2 1 1 0 1 1 110011 458 1 1 1 -1 -1 1 1 3 0 0 1 1 1 110110 536 1 1 1 -1 1 1 -1 3 0 1 1 0 1 111001 464 1 1 1 1 -1 -1 1 3 1 0 0 1 1 111100 532 1 1 1 1 1 -1 -1 3 1 1 0 0 2 000000 567 -1 -1 1 -1 -1 -1 -1 0 0 0 0 0 2 000101 549 -1 -1 1 -1 1 -1 1 0 0 1 0 1 2 001010 391 -1 -1 1 1 -1 1 -1 0 1 0 1 0 2 001111 418 -1 -1 1 1 1 1 1 0 1 1 1 1 2 010001 458 -1 1 -1 -1 -1 -1 1 1 0 0 0 1 2 010100 499 -1 1 -1 -1 1 -1 -1 1 0 1 0 0 2 011011 381 -1 1 -1 1 -1 1 1 1 1 0 1 1 2 011110 451 -1 1 -1 1 1 1 -1 1 1 1 1 0 2 100001 499 1 -1 -1 -1 -1 -1 1 2 0 0 0 1 2 100100 483 1 -1 -1 -1 1 -1 -1 2 0 1 0 0 2 101011 368 1 -1 -1 1 -1 1 1 2 1 0 1 1 2 101110 456 1 -1 -1 1 1 1 -1 2 1 1 1 0 2 110000 475 1 1 1 -1 -1 -1 -1 3 0 0 0 0 2 110101 597 1 1 1 -1 1 -1 1 3 0 1 0 1 2 111010 414 1 1 1 1 -1 1 -1 3 1 0 1 0 2 111111 452 1 1 1 1 1 1 1 3 1 1 1 1 ; run;