'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 #2
SAS Source: FAC_2.SAS

Example

An engineer suspects that the surface finish of a metal part is influenced by the feed rate and the depth of cut.

The engineer selects three feed rates and randomly chooses four depths of cut. She then conducts a factorial experiment and obtains the following data.



Feed Rate
(in/min)
Depth of Cut (in)
0.15 0.18 0.20 0.25
0.20 74 79 82 99
64 68 88 104
60 73 92 96
0.25 929899104
86104108110
88889599
0.30 99 104 108 114
98 99 110 111
102 95 99 107

  1. Analyze the data and draw conclusions.
  2. Prepare appropriate residual plots and comment on model adequacy.
  3. Obtain point estimates of the mean surface finish at each feed rate
  4. Estimate the variance component for the depth of cut

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

SAS Listing


OPTIONS LINESIZE=80;
TITLE1 'Factorial Design of Metal Part Finish  ';
TITLE2 'Factor A (DEPTH): 4 Levels of Depth of Cut (.15, .18, .2, .25 )';
TITLE3 'Factor B (FEED) : 3 Levels of Feed Rate (0.2, 0.25, 0.3 in/min)';
TITLE4 '* FSYM is the alphabetical symbol for Feed Rate values';
TITLE5 ' (0.02 = O,  0.25 = P,  0.30 = Q)';
DATA SURFNS;
/* @@ means a loop in reading input variable sequence */
INPUT DEPTH FEED FSYM $ FINISH  @@;
CARDS;
0.15 0.20 O 74    0.15 0.20 O 64    0.15 0.20 O 60
0.15 0.25 P 92    0.15 0.25 P 86    0.15 0.25 P 88
0.15 0.30 Q 99    0.15 0.30 Q 98    0.15 0.30 Q 102
0.18 0.20 O 79    0.18 0.20 O 68    0.18 0.20 O 73
0.18 0.25 P 98    0.18 0.25 P 104   0.18 0.25 P 88
0.18 0.30 Q 104   0.18 0.30 Q 99    0.18 0.30 Q 95
0.20 0.20 O 82    0.20 0.20 O 88    0.20 0.20 O 92
0.20 0.25 P 99    0.20 0.25 P 108   0.20 0.25 P 95
0.20 0.30 Q 108   0.20 0.30 Q 110   0.20 0.30 Q 99
0.25 0.20 O 99    0.25 0.20 O 104   0.25 0.20 O 96
0.25 0.25 P 104   0.25 0.25 P 110   0.25 0.25 P 99
0.25 0.30 Q 114   0.25 0.30 Q 111   0.25 0.30 Q 107
;
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 DEPTH FEED ;
     VAR FINISH;
     TABLE FEED, DEPTH*FINISH/CONDENSE;
     KEYLABEL SUM='Y(IJ)';
RUN;

/* General Linear Model (GLM)                    */
PROC GLM;
     CLASS DEPTH FEED FSYM;
/* Dependent = Effects                           */
     MODEL  FINISH= DEPTH FEED DEPTH*FEED;
     OUTPUT OUT = A2  P = YHAT  R = RESID;
RUN;

PROC PLOT DATA = A2;
     PLOT YHAT*DEPTH = FSYM/HAXIS = 0.1 TO 0.3 BY 0.05;
     PLOT RESID*YHAT;
RUN;


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

PROC PLOT DATA = NPLOT2;
     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