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;
|