## Example 11 for PROC GLM

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: GLMEX11                                             */
/*   TITLE: Example 11 for PROC GLM                             */
/* PRODUCT: STAT                                                */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Screening design, fractional factorial              */
/*   PROCS: GLM                                                 */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT: sasrdt                                              */
/*     REF: PROC GLM, EXAMPLE 11.                               */
/*    MISC:                                                     */
/****************************************************************/

/* Analysis of a Screening Design ------------------------------*/
data HalfFraction;
input power flow pressure gap rate;
datalines;
0.8   4.5 125 275     550
0.8   4.5 200 325     650
0.8 550.0 125 325     642
0.8 550.0 200 275     601
1.2   4.5 125 325     749
1.2   4.5 200 275    1052
1.2 550.0 125 275    1075
1.2 550.0 200 325     729
;
proc glm data=HalfFraction;
class power flow pressure gap;
model rate=power|flow|pressure|gap@2;
run;
/* Analyze Aliasing: First Make Aliasing Structure Interpretable*/
data Coded; set HalfFraction;
power    = -1*(power   =0.80) + 1*(power   =1.20);
flow     = -1*(flow    =4.50) + 1*(flow    =550 );
pressure = -1*(pressure=125 ) + 1*(pressure=200 );
gap      = -1*(gap     =275 ) + 1*(gap     =325 );
run;
/* Then Reanalyze Coded Design --------------------------------*/
proc glm data=Coded;
model rate=power|flow|pressure|gap@2 / solution aliasing;
run;
/* Create Data Set for Remaining Runs of the Experiment --------*/
data OtherHalf;
input power flow pressure gap rate;
datalines;
0.8   4.5 125 325     669
0.8   4.5 200 275     604
0.8 550.0 125 275     633
0.8 550.0 200 325     635
1.2   4.5 125 275    1037
1.2   4.5 200 325     868
1.2 550.0 125 325     860
1.2 550.0 200 275    1063
;
data FullRep;
set HalfFraction OtherHalf;
run;
/* Perform Analysis of Variance Again --------------------------*/
proc glm data=FullRep;
class power flow pressure gap;
model rate=power|flow|pressure|gap@2;
run;