'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 m Latin Square Design
SAS Source: LAT_1.SAS

Example

A chemist wishes to test the effect of four chemical agents on the strength of a particular type of cloth. Because there might be variability from one bolt [of the cloth] to another, the chemist decides to use a randomized block design, with the bolts of cloth considered as blocks.

The chemist selects five bolts and applies all four chemicals in random order to each bolt. The resulting tensile strengths (in psi) follow. Analyze the data and draw appropriate conclusions.

Chemical Bolt [of the Cloth]
1 2 3 4 5
1 73 68 74 71 67
2 7367757270
3 75 63 78 73 68
4 7371757569

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 m Latin Square Design';
TITLE2 'Response var. : Effect of catalyst on the';
TITLE3 '                reaction of a chemical process';
DATA CLOTH;
/* @@ means a loop in reading input variable sequence */
INPUT BOLT CHEMICAL STRENGTH @@;
CARDS;  
1 1 73   2 1 68   3 1 74   4 1 71   5 1 67 
1 2 73   2 2 67   3 2 75   4 2 72   5 2 70 
1 3 75   2 3 68   3 3 78   4 3 73   5 3 68 
1 4 73   2 4 71   3 4 75   4 4 75   5 4 69 
;
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 CHEMICAL BOLT ; 
     VAR STRENGTH;
     TABLE CHEMICAL, BOLT*STRENGTH; 
     KEYLABEL SUM='Y(IJ)'; 
RUN;

/* Analysis of Variance (ANOVA)                  */
PROC ANOVA;
     CLASS BOLT CHEMICAL;  
/* Dependent = Effects                           */
     MODEL  STRENGTH = BOLT CHEMICAL;
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