graeco-latin square sas code

2
Graeco-Latin Square /* Montgomery prob 5-18. The assembly time of a television component is compared using four methods (A,B,C,D). To reduce variability in the response the four methods are balanced with respected to: operator (column), order of assembly (row), workplace (Greek letter), in a Graeco-Latin Square design. */ options ps=50 ls=74 nodate; data assemb; input row col letter $ trt $ time; datalines; 1 1 beta C 11 1 2 gamma B 10 1 3 delta D 14 1 4 alpha A 8 2 1 alpha B 8 2 2 delta C 12 2 3 gamma A 10 2 4 beta D 12 3 1 delta A 9 3 2 alpha D 11 3 3 beta B 7 3 4 gamma C 15 4 1 gamma D 9 4 2 beta A 8 4 3 alpha C 18 4 4 delta B 6 ; proc glm; class row col letter trt; model time=row col letter trt; means trt /lsd; proc glm; class trt; model time=trt; means trt /lsd; run; The GLM Procedure The GLM Procedure The GLM Procedure The GLM Procedure Class Level Information Class Levels Values row 4 1 2 3 4 col 4 1 2 3 4 letter 4 alpha beta delta gamma trt 4 A B C D Number of observations 16 Dependent Variable: time Sum of Source DF Squares Mean Square F Value Pr > F Model 12 122.5000000 10.2083333 1.11 0.5295 Error 3 27.5000000 9.1666667 Corrected Total 15 150.0000000 R-Square Coeff Var Root MSE time Mean 0.816667 28.83477 3.027650 10.50000 Source DF Type I SS Mean Square F Value Pr > F row 3 0.50000000 0.16666667 0.02 0.9960 col 3 19.00000000 6.33333333 0.69 0.6157 letter 3 7.50000000 2.50000000 0.27 0.8429 trt 3 95.50000000 31.83333333 3.47 0.1669 Source DF Type III SS Mean Square F Value Pr > F row 3 0.50000000 0.16666667 0.02 0.9960 col 3 19.00000000 6.33333333 0.69 0.6157 letter 3 7.50000000 2.50000000 0.27 0.8429 trt 3 95.50000000 31.83333333 3.47 0.1669 t Tests (LSD) for time NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate. Alpha 0.05 Error Degrees of Freedom 3 Error Mean Square 9.166667 Critical Value of t 3.18245 Least Significant Difference 6.8132 Means with the same letter are not significantly different. t Grouping Mean N trt A 14.000 4 C A A 11.500 4 D A A 8.750 4 A A A 7.750 4 B

Upload: heavensthunderhammer

Post on 15-Apr-2016

25 views

Category:

Documents


11 download

DESCRIPTION

Graeco-Latin Square SAS Code

TRANSCRIPT

Page 1: Graeco-Latin Square SAS Code

Graeco-Latin Square /* Montgomery prob 5-18. The assembly time of a television component is compared using four methods (A,B,C,D). To reduce variability in the response the four methods are balanced with respected to: operator (column), order of assembly (row), workplace (Greek letter), in a Graeco-Latin Square design. */ options ps=50 ls=74 nodate; data assemb; input row col letter $ trt $ time; datalines; 1 1 beta C 11 1 2 gamma B 10 1 3 delta D 14 1 4 alpha A 8 2 1 alpha B 8 2 2 delta C 12 2 3 gamma A 10 2 4 beta D 12 3 1 delta A 9 3 2 alpha D 11 3 3 beta B 7 3 4 gamma C 15 4 1 gamma D 9 4 2 beta A 8 4 3 alpha C 18 4 4 delta B 6 ; proc glm; class row col letter trt; model time=row col letter trt; means trt /lsd; proc glm; class trt; model time=trt; means trt /lsd; run;

The GLM Procedure The GLM Procedure The GLM Procedure The GLM Procedure

Class Level Information

Class Levels Values

row 4 1 2 3 4

col 4 1 2 3 4

letter 4 alpha beta delta gamma

trt 4 A B C D

Number of observations 16

Dependent Variable: time

Sum of

Source DF Squares Mean Square F Value Pr > F

Model 12 122.5000000 10.2083333 1.11 0.5295

Error 3 27.5000000 9.1666667

Corrected Total 15 150.0000000

R-Square Coeff Var Root MSE time Mean

0.816667 28.83477 3.027650 10.50000

Source DF Type I SS Mean Square F Value Pr > F

row 3 0.50000000 0.16666667 0.02 0.9960

col 3 19.00000000 6.33333333 0.69 0.6157

letter 3 7.50000000 2.50000000 0.27 0.8429

trt 3 95.50000000 31.83333333 3.47 0.1669

Source DF Type III SS Mean Square F Value Pr > F

row 3 0.50000000 0.16666667 0.02 0.9960

col 3 19.00000000 6.33333333 0.69 0.6157

letter 3 7.50000000 2.50000000 0.27 0.8429

trt 3 95.50000000 31.83333333 3.47 0.1669

t Tests (LSD) for time

NOTE: This test controls the Type I comparisonwise error rate, not the

experimentwise error rate.

Alpha 0.05

Error Degrees of Freedom 3

Error Mean Square 9.166667

Critical Value of t 3.18245

Least Significant Difference 6.8132

Means with the same letter are not significantly different.

t Grouping Mean N trt

A 14.000 4 C

A

A 11.500 4 D

A

A 8.750 4 A

A

A 7.750 4 B

Page 2: Graeco-Latin Square SAS Code

The GLM Procedure The GLM Procedure The GLM Procedure The GLM Procedure

Class Level Information

Class Levels Values

trt 4 A B C D

Number of observations 16

Dependent Variable: time

Sum of

Source DF Squares Mean Square F Value Pr > F

Model 3 95.5000000 31.8333333 7.01 0.0056

Error 12 54.5000000 4.5416667

Corrected Total 15 150.0000000

R-Square Coeff Var Root MSE time Mean

0.636667 20.29637 2.131119 10.50000

Source DF Type I SS Mean Square F Value Pr > F

trt 3 95.50000000 31.83333333 7.01 0.0056

Source DF Type III SS Mean Square F Value Pr > F

trt 3 95.50000000 31.83333333 7.01 0.0056

t Tests (LSD) for time

NOTE: This test controls the Type I comparisonwise error rate, not the

experimentwise error rate.

Alpha 0.05

Error Degrees of Freedom 12

Error Mean Square 4.541667

Critical Value of t 2.17881

Least Significant Difference 3.2833

Means with the same letter are not significantly different.

t Grouping Mean N trt

A 14.000 4 C

A

B A 11.500 4 D

B

B C 8.750 4 A

C

C 7.750 4 B