'Life is after all a recursive summation, indeed     Let's do some Statistics!

Department of Civil and Environmental Engineering
Frank Batten College of Engineering and Technology
Old Dominion University
Norfolk, Virginia 23529-0241, USA
Tel) (757) 683-3753
Fax) (757) 683-5354


	
Return to CEE 700/800 Homepage
CEE 700/800 Access Counter
 
Go back to
SAS Source Page
Factorial Design #1
SAS Source: FAC_1.SAS

Example

The yield of a chemical process is being studied. The two most important controlling variables are thought to be the pressure and the temperature.

Three levels of each factor are selected, and a factorial experiment with two replica performed. The yield data are shown as below.

Temperature (°C) Pressure (psi)
200 215 230
Low 90.4 90.7 90.2
90.2 90.6 90.4
Medium 90.190.589.9
90.390.690.1
High 90.5 90.8 90.4
90.7 90.9 90.1


  1. Analyze the data and draw conclusions.
  2. Prepare appropriate residual plots and comment on model adequacy.
  3. Under what conditions would you operate this process based on your analysis? Why?

Use following SAS source to analyze above problem. Closely examine comments in the source for specific model options.

SAS Listing


OPTIONS LINESIZE=80;
TITLE1 'Factorial design of chemical process yield';
TITLE2 'Factor A (PRESS) : 3 Levels of Pressure (200, 215, 230)  ';
TITLE3 'Factor B (TEMP)  : 3 Levels of Temperature (Low, Medium, High) ';
DATA CHMPRS;
/* @@ means a loop in reading input variable sequence */
INPUT PRESS TEMP $ YIELD @@;
CARDS;
200 LOW    90.4  200 LOW    90.2
200 MEDIUM 90.1  200 MEDIUM 90.3
200 HIGH   90.5  200 HIGH   90.7
215 LOW    90.7  215 LOW    90.6
215 MEDIUM 90.5  215 MEDIUM 90.6
215 HIGH   90.8  215 HIGH   90.9
230 LOW    90.2  230 LOW    90.4
230 MEDIUM 89.9  230 MEDIUM 90.1
230 HIGH   90.4  230 HIGH   90.1
; 
RUN;

/* Print the original data set                   */
PROC PRINT;
RUN;

/* Create Table & tabulate input data set        */
/* Nicety, but not absolutely necessary for      */
/* the analysis - you may skip                   */
PROC TABULATE;        
     CLASS PRESS TEMP;
     VAR YIELD;
     TABLE TEMP, PRESS*YIELD/CONDENSE;
     KEYLABEL SUM='Y(IJ)';
RUN;

/* General Linear Model (GLM)                    */
PROC GLM;
     CLASS PRESS TEMP;
/* Dependent = Effects                           */
     MODEL  YIELD = PRESS TEMP PRESS*TEMP;
     OUTPUT OUT = A1  P = YHAT  R = RESID;
RUN;

PROC PLOT DATA = A1;
     PLOT YHAT*PRESS = TEMP/HAXIS = 180 TO 250 BY 10;
     PLOT RESID*YHAT;
RUN;


/* Compute Normal Scores of input data, 'A1'     */
/* using cum. normal function/Residual           */
/* BLOM -> yi = þ-1(ri -3/8)/(n+1/4)              */
/*         ri = rank of the ith obs              */
PROC RANK DATA = A1 NORMAL = BLOM OUT = NPLOT1;
     VAR RESID;
     RANKS NSCORE;
RUN;

PROC PLOT DATA = NPLOT1;
     PLOT NSCORE*RESID;
RUN;

SAS Listing

SAS User Guide (SUG) for Procedures (PROC) used in the Source

SUG GLM procedure
SUG PLOT procedure
SUG PRINT procedure
SUG RANK procedure
SUG TABULATE procedure
Go back to
SAS Source Page

Return to CEE 700/800 Homepage Return to CEE 700/800 Homepage Move to the Top of this page