KNNL-Ch19

advertisement
Two-Factor Studies with Equal
Replication
KNNL – Chapter 19
Two Factor Studies
• Factor A @ a levels
Factor B @ b levels
 ab ≡ # treatments with n replicates per treatment
• Controlled Experiments (CRD) – Randomize abn
experimental units to the ab treatments (n units per trt)
• Observational Studies – Take random samples of n units
from each population/sub-population
• One-Factor-at-a-Time Method – Choose 1 level of one
factor (say A), and compare levels of other factor (B).
Choose best level factor B levels, hold that constant and
compare levels of factor A
 Not effective – Poor randomization, logistics, no interaction tests
 Better Method – Observe all combinations of factor levels
ANOVA Model Notation – Additive Model
Halo Effect Study: Factor A: Essay Quality(Good,Poor) Factor B: Photo: (Attract,Unatt,None)
A=EQ\B=Pic
j=1: Attract
j=2: Unatt
j=3: None
Row Average
i=1: Good
m11 = 25
m12 = 18
m13 = 20
m1● = 21
i=2: Poor
m21 = 17
m22 = 10
m23 = 12
m2● = 13
Column Average m●1 = 21
m●2 = 14
m●3 = 16
m●● = 17
Additive Effects Model: mij  m   i   j
a
b
1 a b
s.t.   i    j  0 m 
mij

ab i 1 j 1
i 1
j 1
b

1 b
1 b
1
 mi   mij    m   i   j   bm  b i    j   m   i
b j 1
b j 1
b
j 1

  i  mi  m
  j  m j  m
 m j  m   j
1 a b
1 a
1 b
m   mij   mi   m j
ab i 1 j 1
a i 1
b j 1
Halo Effect Example:
1  m1  m  21  17  4
1  m1  m  21  17  4
 2  m 2  m  13  17  4
 2  m2  m  14  17  3
1   2  0
3  m3  m  16  17  1
Mean Score versus - Essay Quality - Additive Model
30
Mean Score
25
20
15
j=1
10
j=2
5
j=3
0
1
2
Essay (1=Good, 2=Poor)
Mean Score versus Picture - Additive Model
30
Mean Score
25
20
15
i=1
i=2
10
5
0
1
2
Picure (1=Attractive, 2=Unattractive, 3=None)
3
ANOVA Model Notation – Interaction Model
Halo Effect Study: Factor A: Essay Quality(Good,Poor) Factor B: Photo: (Attract,Unatt,None)
A=EQ\B=Pic
j=1: Attract
j=2: Unatt
j=3: None
Row Average
i=1: Good
m11 = 23
m12 = 20
m13 = 20
m1● = 21
i=2: Poor
m21 = 19
m22 = 8
m23 = 12
m2● = 13
m●2 = 14
m●3 = 16
m●● = 17
Column Average m●1 = 21
Interaction Model: mij  m   i   j   ij

a
s.t.
b
a
b
           
i 1
i
j 1
j

i 1
ij
j 1
ij
0
  ij  mij   m   i   j   mij  m   mi  m    m j  m   mij  mi  m j  m
Halo Effect Example:
 11  23  21  21  17  2
 21  19  23  21  17  2
 12  20  21  14  17  2
 22  8  13  14  17  2
 13  20  21  16  17  0
 23  12  13  16  17  0
Mean Score versus Essay Quality (A) by Picture - Interaction Model
25
Mean Score
20
15
j=1
10
j=2
5
j=3
0
1
2
Essay (1=Good, 2=Poor)
Mean Score versus Picture (B) by Essay Quality - Interaction Model
25
Mean Score
20
15
i=1
10
i=2
5
0
1
2
Picture (1=Attractive, 2=Unattractive, 3=None)
3
Comments on Interactions
• Some interactions, while present, can be ignored and
analysis of main effects can be conducted. Plots with
“almost” parallel means will be present.
• In some cases, a transformation can be made to
remove an interaction. Typically: logarithmic, square
root, square or reciprocal transformations may work
• In many settings, particular interactions may be
hypothesized, or observed interactions can have
interesting theoretical interpretations
• When factors have ordinal factor levels, we may
observe antagonistic or synergistic interactions
Two Factor ANOVA – Fixed Effects – Cell Means
Fixed Effects - All factor levels of interest are used in the experiment
Cell Means Model:
Yijk  mij   ijk i  1,.., a; j  1,..., b; k  1,..., n; nT  abn
mij  mean when Factor A at level i, B at j  ijk ~ NID  0,  2 
Matrix Form  a  2, b  2, n  2  :
Y111 
111 
 m11 
111 
1 0 0 0 
Y 
 
m 
 
1 0 0 0 
 112 
 112 
 11 
 112 


Y121 
121 
 m12 
121 
0 1 0 0   m11 




 



 
Y
m

m

0
1
0
0
  12    122    12    122 
Y = Xβ + ε   122   
Y211 
 211 
 m21 
 211 
0 0 1 0   m21 




 



 
Y212 
 212 
 m21 
 212 
0 0 1 0   m22 
Y 
 
m 
 
0 0 0 1 
221
221
22




 
 221 


0 0 0 1 
Y222 
 m22 
 222 
 222 
σ 2 Y = σ 2 ε = σ 2I nT
Two Factor ANOVA – Fixed Effects – Factor Effects
Fixed Effects - All factor levels of interest are used in the experiment
Factor Effects Model:
Yijk  m   i   j   ij   ijk
1 a b
m   mij
ab i 1 j 1
i  1,.., a;
 i  mi  m
j  1,..., b; k  1,..., n; nT  abn
 j  m j  m
 ij  mij  mi  m j  m
m  overall mean
 i  main effect of i th level of A
 j  main effect of j th level of B
 ij
 interaction of effect at i th level of A and j th level of B
a
b
a
b
            
i 1
i
j 1

j
i 1
ij
j 1
Yijk ~ N m   i   j   ij ,  2

ij
 ijk ~ NID  0,  2 
0
independent with
mij  m   i   j   ij
Analysis of Variance – Least Squares/ML Estimators
Notation: Observation when A @ i, B @ j , k th replicate: Yijk
Sample mean when A @ i, B @ j :
Sample mean when A @ i :
Sample mean when B @ j :
Overall Mean: Y 
Y ij 
Yij 
1 n
  Yijk 
n k 1
n
Y i 
Y
1 b n

Yijk  i 


bn j 1 k 1
bn
Y  j
Y j 
1 a n

Y

  ijk bn
an i 1 k 1
Y
1 a b n

Yijk  



abn i 1 j 1 k 1
abn
Error Sum of Squares: Q      ijk     Yijk  mij 
a
b
n
a
b
n
2
i 1 j 1 k 1
Q
0
mij

2
i 1 j 1 k 1
^
Least squares (and maximum likelihood) estimators: m ij  Y ij 
^
Fitted values: Y ijk  Y ij 
^
Residuals: eijk  Yijk  Y ijk  Yijk  Y ij 
Factor Effects Model Estimators:
^
m
^

^
 i  Y i   Y 
 Y 

 
^
 j  Y  j   Y 
 
^
 ij
 Y ij   Y i  Y  j   Y 

Y ijk  Y   Y i   Y   Y  j   Y   Y ij   Y i   Y  j   Y   Y ij 
Analysis of Variance – Sums of Squares

     Y
 

     Y
Cell Means Model: Yijk  Y   Yijk  Y ij   Y ij   Y 
   Y
a
b
n
ijk
i 1 j 1 k 1
 Y 
a
2
b
n
ijk
i 1 j 1 k 1
 Y ij 
2
a
b
n
ij 
 Y 
i 1 j 1 k 1

2
SSTO  SSE  SSTR
df E  ab  n  1  nT  ab
dfTO  abn  1  nT  1
Factor Effects Model:

 
 
dfTR  ab  1
 
Yijk  Y   Yijk  Y ij   Y i   Y   Y  j   Y   Y ij   Y i   Y  j   Y 
   Y
ijk
i
j
j


    Yijk  Y ij 
k

i
 Y 
2
i
Y  j   Y 

2
j
k
     Y
2
i

k
    Y ij   Y i   Y  j   Y 
k
i
j
k
SSTO  SSE  SSA  SSB  SSAB
dfTO  abn  1  nT  1
df A  a  1
j
df B  b  1
df E  ab  n  1  nT  ab
df AB   a  1 b  1

2
i 
 Y 

2


Analysis of Variance – Expected Mean Squares
Factor Effects Model:
SSE 

i
j
Yijk  Y ij 

2
df E  ab  n  1
MSE 
k

SSA  bn  Y i   Y 

2
df A  a  1
MSA 
i
a
E MSA   2 
bn  
i 1
a
2
i
a 1

SSB  an  Y  j   Y 

2
2 
bn   mi  m 
E MSB   2 
an  
j 1
a 1
MSB 
an   m j  m 
b
b 1
2 

MSAB 
SSB
b 1
2
j 1
b 1
SSAB  n   Y ij   Y i   Y  j   Y 
i
SSA
a 1
2
i
2
j
E MSE    2
i 1
df B  b  1
b
SSE
ab  n  1

2
df AB   a  1  b  1
j
SSAB
 a  1  b  1
n    ij
2
E MSAB   2 
i
j
 a  1  b  1
2 
n    mij  mi   m j  m 
i
j
 a  1  b  1
2
ANOVA Table – F-Tests
Source
df
SS
MS
F*
Factor A
a-1
SSA
MSA=SSA/(a-1)
FA*=MSA/MSE
Factor B
b-1
SSB
MSB=SSB/(b-1)
FB*=MSB/MSE
AB Interaction
(a-1)(b-1)
SSAB
MSAB=SSAB/[(a-1)(b-1)] FAB*=MSAB/MSE
Error
ab(n-1)
SSE
MSE=SSE/[ab(n-1)]
Total
abn-1
SSTO
Testing for Interaction Effects: H 0AB :  11  ...   ab  0  mij  mi  m j  m for all (i, j )
*
Test Statistic: FAB

MSAB
MSE
*
Reject H 0 if FAB
 F .95;  a  1 b  1 , ab  n  1 
Testing for Factor A Main Effects: H 0A : 1  ...   a  0  mi  m for all i
Test Statistic: FA* 
MSA
MSE
MSB
MSE
No Factor A Level Effects
Reject H 0 if FA*  F .95; a  1, ab  n  1 
Testing for Factor B Main Effects: H 0B : 1  ...  b  0  m j  m for all j
Test Statistic: FB* 
No Interaction
Reject H 0 if FB*  F .95; b  1, ab  n  1 
No Factor B Level Effects
Testing/Modeling Strategy
• Test for Interactions – Determine whether they are
significant or important – If they are:
 If the primary interest is the interactions (as is often the case in
behavioral research), describe the interaction in terms of cell
means
 If goal is for simplicity of model, attempt simple
transformations on data (log, square, square root, reciprocal)
• If they are not significant or important:
 Test for significant Main Effects for Factors A and B
 Make post-hoc comparisons among levels of Factors A and B,
noting that the marginal means of levels of A are based on bn
cases and marginal means of levels of B are based on an cases
Factor Effect Contrasts when No Interaction
a
Contrasts among Levels of Factor A : L   ci mi
i 1
a
^
c
i 1
i
0

  
^
Estimator: L   ci Y i
Estimated Standard Error: s L 
i 1
1   100% CI for L :
a
MSE a 2
ci

bn i 1
L  t 1   2  ; ab  n  1 s L
^
^
^
Scheffe' Method for Many (or data-driven) tests: L 
 a  1 F 1   ; a  1, ab  n  1 s

  


Bonferroni Method for g Pre-planned Tests: L  t 1   /  2 g   ; ab  n  1 s L
^
^
^
1
Tukey Method for all Pairs of Factor A Levels: L 
q 1   ; a, ab  n  1 s L
2
^
Similar Results for Factor B, with a and b being "reversed" in all formulas:
b
L   c j m j
j 1
b
c
j 1
j
0
^
b
L  cjY  j
j 1

^
s L 
MSE b 2
cj

an j 1

^
L
Factor Effect Contrasts when Interaction Present
a
b
Contrasts among Cell Means : L   cij mij
i 1 j 1
^
a
b
Estimator: L   cij Y ij 
a
 c
i 1 j 1
ij
0

^
Estimated Standard Error: s L 
i 1 j 1
1   100% CI for L :
b

MSE a b 2
cij

n i 1 j 1
L  t 1   2  ; ab  n  1  s L
^
^
^
Scheffe' Method for Many (or data-driven) tests: L 

 ab  1 F 1   ; ab  1, ab  n  1 s


Bonferroni Method for g Pre-planned Tests: L  t 1   /  2 g   ; ab  n  1 s L
^
^

^
1
Tukey Method for all Pairs of Treatment Means: L 
q 1   ; ab, ab  n  1  s L
2
^

^
L
Download