s:c/--cp &1. {A' .5J"'-4<..-e.- r I U4'_ @ v #lad;'n;) / 'V
I (
(
I r
I 2- 3 4- N l<.o r-- ,.._.... --• - •
, , "
• ., •
- • , .__ ...__ ..__
--'"!
l
• ) • _7 • J ...__
I 1. vJ/dYL. f tcl>A'\ ('.{ s, f1! fl m/ (/)-1_
rrz4dr_,tvl .1. v.
fud,,,_/ -#_µ/s a_
• .fwo /µ./dUJ
• of hlvmu,,_ 4 (;dr/d/.re)
VLO 44?? o/' -j"./u, / ,,J ru.V)
. .,. h,'....dc/h_ ,, J
J_ . /,M4 /'?; /)t;V c/
i4 a. . S_?"'<>-u.o
s r-.r.v
-tiu_ .... /i'an l..u/ ':J & <.O ft!J 4 S"!f
Q r wd -- f;r f"' m ...:& <td r o-w s µ._,_ <tJ J' {Jl-t ht J.. t "(t_., "1 .f I (j) T' eu...of -fa dt4o
z z L_ !tr,·. IA _ rv-- ) 2 , • . k... i d rL • • -
J
/Jf\JOVA j.f. .E_ ... t --- -12-rrw s 4-/
ct) /UA-nn s ss(_"L -t) a - / SS' Ttf...T ss,.fl.T ffi-,)
Gt-:r4-1) j ss:fr }(t:1-!)) e, 77>/7/-L
ti - I S Sib/A-(_
s -} t-c.d-';o-i., .
dd- t:lr'?oshs (f) 0tt!{J m&r c/" q,;,,i:-
{'tfiz
Wh1 ,lo a_ {T v
WAJ .:/ .;/i.w -o/jl-41,NJ 4 Re 11 tJ w, ·/h ""- bl tnh ?
y/fo bfoJ<s -9 51-tliP-= fly -ht/J
'-llta:; no-/- k ho J
51c-ia-JL 4./ks ycn.v &.r A ..
Cl !aA' s, Lcit.; sg"'-a.u.v t"'4-1. vd of/' .a-/ tf}4'l /ui dV.
We ea-<_ r- udR /tu s g u C4u.V !f.lii/iJ fti
m rfl..a_ oA. f ,/ tJL .vur av) b.::_l- y ./o of.{ ,/t1t
fad<fl of '.'
E KtM«r : /Pl / ;;iA Do 2.
s cvY>'\..J{
--
t2.c P l
D A- 13 f.l A 12,:;
p, () 1+- /? (!__ D
I ,t:V\ (J aJo_J- -fu
of.{ 11-/J
I it2 l'lchtS W
'f'aA'L ; I\.. C1W\.. </Z olvr.
2.,,/rto.;O?J wt// t0.- ""'ef\...Q_ d..-[ f<>L J
b J- lrt 0 CV u,..e_ r ..Lt-€ /c_a.:{p 5 o/, i
AAfdVA SfJ1AA/U-
- macl\,'ru4)
r -2--f .£./1./(_ (/(_
4-/ 3 a.-1-==- 3 tt-1 = 3 1-1 =- I
ot+ t/h_q,d-t ll - I S
(lf.-r ){ r) &; 3
r-1 I
(r0i_-l. "'f q -1 ):; I F
+ f'>t (U ol . .( !..e
I/\.
4-/-:::. 3 r- I -:::_ I
a_ - r-t )=- IS-2 rl\ - I =- 3 I
STAT:5201 Applied Statistic II
Latin Square Design (no replication)
Rocket Propellant Example
An experimenter is studying the effects of five different formulations of a rocket propellant on the burning rate of the propellant. Each formulation is mixed from a batch of raw material that is only large enough for five formulations to be tested. Also the formulations are prepared by several operntors, whose skill and experience may affect the burn rate.
Response: Burn rate. Factors: Formulation (5 levels), Material (5 levels), and Operator( 5 levels).
SAS statements for data input and Proc GLM:
data rocket; do material=l to 5;
do operator=l to 5; input formulation $ rate ©©; output;
end; end;
datalines; A 24 B 20 C 19 D 24 E 24 B 17 C 24 D 30 E 27 A 36 C 18 D 38 E 26 A 27 B 21 D 26 E 31 A 26 B 23 C 22 E 22 A 30 B 20 C 29 D 31
proc print data=rocket; run;
Obs material operator
1 2 3 4 5 6 7 8 9
10 11 12 13 14 15 16
1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1
formulation
A B c D E B c D E A c D E A B D
1
rate
24 20 19 24 24 17 24 30 27 36 18 38 26 27 21 26
17 4 2 E 18 4 3 A 19 4 4 B 20 4 5 c 21 5 1 E 22 5 2 A 23 5 3 B 24 5 4 c 25 5 5 D
proc gplot data=rocket; plot rate* (formulation material operator);
run;
Rate vs. Formulation:
30
A
Rate vs. Material:
20 + +
c D
fonnulation
matenal
2
31 26 23 22 22 30 20 29 31
Rate vs. Operator:
ra:
30
JO
operator
SAS statements for Proc GLM:
proc glm data=rocket plot=diagnostics; class formulation material operator; model rate = formulation material operator/solution; lsmeans formulation/adjust=tukey pdiff; output out=diags r=residual p=predicted;
run;
The GLM Procedure Class Level Information
Class Levels Values formulation 5 A B C D E material operator
Dependent
Source Model Error Corrected
Source
5 5
Variable: rate
Total
formulation material operator
1 2 3 4 5 1 2 3 4 5
Sum of DF Squares 12 548.0000000 12 128.0000000 24 676.0000000
DF Type III SS
4 330.0000000 4 68.0000000 4 150.0000000
Mean Square 45.6666667 10.6666667
Mean Square
82.5000000 17.0000000 37.5000000
3
F Value Pr > F 4.28 0.0089
F Value Pr > FI 7.73 0.0025 ...e, 1.59 0.2391 3.52 0.0404
STAT:5201 Applied Statistic II
Latin Square Design (replicated)
Auto Carbon Monoxide (CO) Emission Example
Suppose the EPA is interested in recommending a certain brand of gasoline for cars with respect to CO emis-sion. There are three brands of gasoline they're interested in comparing. Since the amount of CO emitted depends on both the types of car (l:small/family sedan, 2:medium/van, 3:large/truck) and the speed the car is traveling in terms of types of routes (l:slow/25mph, 2:medium/45mph, 3:fast/65mph), these two factors, namely car and route, are taken into consideration during the design stage.
A Latin Square design is decided upon, but with only 3 treatment level:,; (a=3), there will be very few d.f. for error with a single square. So, four replications are done.
Response: emission. Factors: gas (3 levels), car (3 levels), and route ( 3 levels). Possible nesting of blocking factors will be described later.
Here are the 4 Latin squares with rows as cars and columns as routes:
A c B B A c c A B c c B A c B A A B c A B A c A c B B c A B
Here are the observed CO emissions:
45 28 24 42 30 26 47 31 25 68 42 23 66 39 25 64 40 27 100 58 38 98 60 33 105 63 35
SAS statements for data input and Proc GLM:
data coemission; do car = 1 to 3;
do route = 1 to 3; do square = 1 to 4;
input gas $ emission ©©; output;
end; end;
end; datalines;
B A c B A c
48 25 65 28
104 34
30 41 65
A 45 B 42 C 47 C 48 C 28 A 30 A 31 B 25 B 24 C 26 B 25 A 30 C 68 C 66 A 64 A 65 B 42 B 39 B 40 C 28 A 23 A 25 C 27 B 41 B 100 A 98 B 105 B 104 A 58 C 60 C 63 A 34 C 38 B 33 A 35 C 65
run;
1
SAS statements for SAME CARS AND SAME ROUTES:
/*same cars and same routes*/ proc glm data=coemission;
class gas car route square; model emission=gas car route square; lsmeans gas;
run;
The GLM Procedure Class Level Information
Class Levels Values gas 3 A B C car 3 1 2 3 route 3 1 2 3 square 4 1 2 3 4
Dependent Variable: emission Sum of
Source DF Squares Model 9 16960.16667 Error 26 3070.83333 Corrected Total 35 20031.00000
Dependent Variable: emission Source DF Type III SS
gas 292.666667 car 6667.166667 route 9968.666667 square 31.666667
Least Squares Means
Mean Square F Value Pr > F 1884.46296 15.96 <.0001
118.10897
Mean Square F Value Pr > F
146.333333 1.24 0.3062 3333.583333 28.22 <.0001 4984.333333 42.20 <.0001
10.555556 0.09 0.9652
gas
A B c
emission LS MEAN
44.8333333 51.6666667 47.0000000
Uo1rJ Co.rs
o r · '.,if f, cl/J-e
2
SAS statements for DIFFERENT CARS AND SAME ROUTES:
/*different cars and same routes*/ proc glm data=coemission;
class gas car route square; model emission=gas car(square) route square; lsmeans gas;
run;
The GLM Procedure
Class Level Information Class Levels Values
gas car route square
Dependent
Source Model Error
Variable:
Corrected Total
Dependent Variable: gas car(square) route square
The GLM Procedure Least Squares Means
3 3 3 4
A B C 1 2 3 1 2 3 1 2 3 4
emission
DF 15 20 35
emission 2
Sum of Squares
16976.33333 3054.66667
20031.00000
292.666667 6683.333333 9968.666667
31.666667
Mean Square F 1131. 75556
152.73333
146.333333 835.416667
4984.333333 10.555556
Value Pr > F 7.41 <.0001
0.96 0.4005 5.47 0.0010
32.63 <.0001 0.07 0.9757
emission 3 ' Ccd'S gas LS MEAN /,un l<..Q_ A 44.8333333 B 51.6666667 (3-F)4 J .+. (f <[; Im c 47.0000000 Car
3
sgu.qf-<1.
,,
SAS statements for SAME CARS AND DIFFERENT ROUTES:
/*same cars and different routes.*/ proc glm data=coemission;
class gas car route square; model emission=gas car route(square) square; lsmeans gas;
run;
The GLM Procedure
Class Level Information
Class Levels Values
gas 3 A B C car 3 1 2 3 route 3 1 2 3 square 4 1 2 3 4
The GLM Procedure
Dependent Variable: emission
Sum of Source DF Squares Model 15 18072.83333 Error 20 1958.16667 Corrected Total 35 20031.00000
Source DF Type III SS gas 2 292.66667 car 2 6667.16667 route(square) 11081. 33333 square 31. 66667
Least Squares Means
Mean Square F Value Pr > F 1204.85556 12.31 <.0001
97.90833
Mean Square F Value Pr > F 146.33333 1.49 0.2483
3333.58333 34.05 <.0001 1385.16667 14.15 <.0001
10.55556 0 .11 0.9545
' j \oJ.e S lwit JlUL emission uc;/"--12 gas LS MEAN so A 44.8333333 br (I J '' B 51.6666667 l5 c 47.0000000 ro e
4
SAS statements for DIFFERENT CARS AND DIFFERENT ROUTES:
/*different cars and different routes.*/ proc glm data=coemission;
class gas car route square; model emission=gas car(square) route(square) square; lsmeans gas;
run;
The GLM Procedure
Class Level Information
Class Levels Values gas 3 A B C car 3 1 2 3 route 3 1 2 3 square 4 1 2 3
Dependent Variable: emission
Source DF Model 21 Error 14 Corrected Total 35
Dependent Variable: emission
Source gas car(square) route(square) square
Least Squares Means
emission gas LSMEAN
A 44.8333333 B 51.6666667 c 47.0000000
DF
4
Sum of Squares Mean Square
18089.00000 861.38095 1942.00000 138.71429
20031.00000
Type III SS Mean Square 292.66667 146.33333
6683.33333. 835.41667 11081. 33333 1385.16667
31.66667 10.55556
Ca\S
5
F Value Pr > F 6.21 0.0005
F Value Pr > F 1.05 0.3743 6.02 0.0018 9.99 0.0001 0.08 0.9719
CfoJ-.es 0/1'1/J {,(_Q___
Medical Example of a Latin Square
6
7
Second Example of a Latin Square
Canadian Medical Association Journal, October 5, 2010, 182(14).
8