'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
n x n Latin Square Design
SAS Source: LAT_2.SAS

Example

The effect of five different catalysts (A, B, C, D, F) on the reaction time of a chemical process is being studied. Each batch of new material is only large enough to permit five runs to be made. Furthermore, each run requires approximately 1½ hours, so that only five runs can be made in one day.

The experimenter decides to run the experiment as a Latin square, so that day and batch effects may be systematically controlled. She obtains the data that follow. Analyze these data and draw conclusions.

Batch Days
1 2 3 4 5
1 A=8 B=7 D=1 C=7 E=3
2 C=11E=2A=7D=3B=8
3 B=4 A=9 C=10 E=1 D=5
4 D=6C=8E=6B=6A=10
5 E=4 D=2 B=3 A=8 C=8

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

SAS Listing


OPTIONS LINESIZE=80;
TITLE1 'n x n Latin Square Design';
TITLE2 'Response var. : Effect of catalyst on the';
TITLE3 '                reaction of a chemical process';
TITLE4 'Treatment  : Five different catalysts (batches)  ';
TITLE5 'Block: Days  ';
DATA PROCESS; 
/* @@ means a loop in reading input variable sequence */
INPUT BATCH DAY CATALYST $ REACTIME @@;  
CARDS;  
1 1 A 8   1 2 B 7   1 3 D 1   1 4 C 7   1 5 E 3 
2 1 C 11  2 2 E 2   2 3 A 7   2 4 D 3   2 5 B 8 
3 1 B 4   3 2 A 9   3 3 C 10  3 4 E 1   3 5 D 5 
4 1 D 6   4 2 C 8   4 3 E 6   4 4 B 6   4 5 A 10
5 1 E 4   5 2 D 2   5 3 B 3   5 4 A 8   5 5 C 8 
;
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 BATCH DAY ;  
     VAR REACTIME;
     TABLE BATCH, DAY*REACTIME/CONDENSE;  
     KEYLABEL SUM='Y(IJ)'; 
RUN;

/* Analysis of Variance (ANOVA)                  */
PROC ANOVA;
     CLASS BATCH DAY CATALYST;
     MODEL REACTIME = BATCH DAY CATALYST; 
RUN;

SAS Listing

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

SUG ANOVA procedure
SUG PRINT 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