**********************************************************; * 2_{IV}^{8-4} fractional factorial designs: * Information about EIGHT factors from 16 observations * Start with 4 factors A B C D, * confound 4 others by E=ABC F=ABD G=ACD H=BCD * Resolution=4, so the 8 main effects are confounded only * with 3-way and higher interactions * The 28 possible 2-way interactions among 8 factors * are confounded into 7 groups of size 4 each. * Use SAS's proc reg to estimate parameters and * proc capability for normal and P-P plots of parm estimates * Use SAS's proc glm to check 2^3 subdesigns for * suspected active factors * * Example: Same design for two response variables for paints, * Glossiness and Abrasion Resistance * See text Table 6.17 p265 in text (Box-Hunter-Hunter) **********************************************************; options ls=75 ps=60 nocenter pageno=1; title1 'EIGHT-FACTOR LAYOUTS WITH 16 OBSERVATIONS - YOUR NAME'; title2 'Nodal 2_{IV}^{8-4} factorial design'; title3 'Defined by confounding the four 3-way interactions in a'; title4 ' 2^4 design with four additional factors'; title5 'The defining relations are E=ABC, F=ABD, G=ACD, H=BCD,'; title6 ' or ABCE=ABDF=ACDG=BCDH=I'; title7 'Main effects are unconfounded except for 3-way and higher interactions'; title8 'Two-way interactions are confounded in 7 groups of size 4 each'; title9 'Example: TWO outcome variables for paint trials:'; data paint; * Two response variables were measured in the same design; input Row A B C D Gloss AbrasRes; * Define two- and three-way interactions by hand; AB=A*B; AC=A*C; AD=A*D; BC=B*C; BD=B*D; CD=C*D; ABC=A*B*C; ABD=A*B*D; ACD=A*C*D; BCD=B*C*D; * Four additional factors are confounded with 3-way interactions; * One additional 2-way interaction for a complete parameter set; E=ABC; F=ABD; G=ACD; H=BCD; DE=D*E; datalines; 1 -1 -1 -1 -1 53 6.3 2 1 -1 -1 -1 60 6.1 3 -1 1 -1 -1 68 5.5 4 1 1 -1 -1 78 2.1 5 -1 -1 1 -1 48 6.9 6 1 -1 1 -1 67 5.1 7 -1 1 1 -1 55 6.4 8 1 1 1 -1 78 2.5 9 -1 -1 -1 1 49 8.2 10 1 -1 -1 1 68 3.1 11 -1 1 -1 1 61 4.3 12 1 1 -1 1 81 3.2 13 -1 -1 1 1 52 7.1 14 1 -1 1 1 70 3.4 15 -1 1 1 1 65 3.0 16 1 1 1 1 82 2.8 run; proc print; title10 'THE DATA AS SAS SEES IT:'; id Row; var A B C D E F G H AB AC AD BC BD CD DE Gloss AbrasRes; run; **********************************************************; * We could skip the text output of `proc reg' output by entering * `noprint' after `outtest=parmrow1', but the text output is an * important check for typographical errors **********************************************************; proc reg data=paint outest=parmrow1; title3 'GLOSSINESS:'; title4 'Using prog reg to get parameter estimates'; model Gloss = A B C D E F G H AB AC AD BC BD CD DE; run; proc reg data=paint outest=parmrow2; title3 'ABRASION RESISTANCE:'; title4 'Using prog reg to get parameter estimates'; model AbrasRes = A B C D E F G H AB AC AD BC BD CD DE; run; **********************************************************; * Combine the two single-row Estimate datasets into one dataset * and rotate them into two columns **********************************************************; data parmrows; set parmrow1; Name="Parm1"; output; set parmrow2; Name="Parm2"; output; run; proc transpose data=parmrows out=coldata name=Effect; id Name; run; **********************************************************; * Let Gloss and AbrasRes be the contrast parameters and drop * superfluous rows and columns **********************************************************; data coldata; set coldata; * Versions as contrasts; Gloss=2*Parm1; AbrasRes=2*Parm2; * Keep only these records; if Effect ne "Intercept" and Effect ne "_RMSE_" and Effect ne "Gloss" and Effect ne "AbrasRes" then output; * No factor labels were defined; drop _LABEL_; run; data coldata; set coldata; Row+1; * This sets Row=current observation number; run; proc print data=coldata; title3 "PARAMETER AND BOOK PARAMETER VALUES IN TWO COLUMNS"; title4 'Compare with Table 6.17 p265'; title5 'Text has typo for AbrasRes on last line'; id Row; var Effect Parm1 Parm2 Gloss AbrasRes; run; **********************************************************; * This syntax avoids overwriting the dataset coldata; **********************************************************; proc sort data=coldata out=parmsort; by descending Gloss; run; proc print data=parmsort; title3 'PARAMETERS SORTED BY GLOSS:'; id Row; var Effect Gloss; run; proc sort data=coldata out=parmsort; by descending AbrasRes; run; proc print data=parmsort; title3 'PARAMETERS SORTED BY ABRASION RESISTANCE:'; id Row; var Effect AbrasRes; run; options ps=40; proc capability data=coldata lineprinter noprint; title3 'NORMAL PROBABILITY PLOT FOR GLOSS'; title4 'It looks like there are 2 high outliers'; var Gloss; probplot / normal; run; proc capability data=coldata lineprinter noprint; title3 'NORMAL PP PLOT FOR GLOSS'; title4 'It looks like there are 2 high outliers'; var Gloss; ppplot / normal noline; run; proc capability data=coldata lineprinter noprint; title3 'NORMAL PROBABILITY PLOT FOR ABRASION RESISTANCE'; title4 'It looks like there are 2 low and one high outlier'; var AbrasRes; probplot / normal; run; proc capability data=coldata lineprinter noprint; title3 'NORMAL PP PLOT FOR ABRASION RESISTANCE'; title4 'It looks like there are 2 low and one high outlier'; var AbrasRes; ppplot / normal noline; run; options ps=60; title3 'FOR GLOSSINESS:'; title4 'The main effects A B seem active, possibly G, the rest inert'; title5 'The design confounds main effects with 3+ order only'; title6 'No two-way interactions appear active, but are confounded'; title7 ' in groups of 4, so they conceivably could cancel'; title8 'Run 2^3 model on A B G'; title9 'GLOSS: A and B are significant, with no interactions'; title10 ' G has P=0.0586, but we have tested 8 main factors'; proc glm data=paint; classes A B G; model Gloss = A | B | G; run; title3 'FOR ABRASION RESISTANCE:'; title4 'Model A B F: The main effects A B F seem active, the rest inert'; title5 'The design confounds main effects with 3+ order only'; title6 'No two-way interactions appear active, but are confounded'; title7 ' in groups of 4, so they conceivably could cancel'; title8 'Run 2^3 model on A B F'; title9 'ABRASION RESISTANCE: A B F are significant, with no interactions'; title10 'Note ABF = AB(ABD) = D has P=0.0383, possibly worthy of interest'; proc glm data=paint; classes A B F; model AbrasRes = A | B | F; run; title4 'Model A B D: The main effects A B seem active, also F = ABD'; title5 'Now D=ABF has P=0.0383'; title6 'Design is of Projectivity=3 only, so cannot resolve further'; title7 'Need more runs to analyze A B D F together,'; title8 ' but probably nothing more to learn'; proc glm data=paint; classes A B D; model AbrasRes = A | B | D; run;