two-factor studies with equal replication knnl – chapter 19

16
Two-Factor Studies with Equal Replication KNNL – Chapter 19

Upload: jonah-washington

Post on 21-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Two-Factor Studies with Equal Replication KNNL – Chapter 19

Two-Factor Studies with Equal Replication

KNNL – Chapter 19

Page 2: 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

Page 3: Two-Factor Studies with Equal Replication KNNL – Chapter 19

ANOVA Model Notation – Additive ModelHalo 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 11 = 25 12 = 18 13 = 20 1● = 21

i=2: Poor 21 = 17 22 = 10 23 = 12 2● = 13

Column Average ●1 = 21 ●2 = 14 ●3 = 16 ●● = 17

1 1 1 1

1 1 1

1 1

1Additive Effects Model: . . 0

1 1 1

1 1

a b a b

ij i j i j iji j i j

b b b

i ij i j i j i j jj j j

a b

i i j j iji j

s tab

b bb b b

ab a

1 1

1 1 2 2 1 2

1 1 2 2 3 3

1

Halo Effect Example:

21 17 4 13 17 4 0

21 17 4 14 17 3 16 17 1

a b

i ji jb

Page 4: Two-Factor Studies with Equal Replication KNNL – Chapter 19
Page 5: Two-Factor Studies with Equal Replication KNNL – Chapter 19

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 11 = 23 12 = 20 13 = 20 1● = 21

i=2: Poor 21 = 19 22 = 8 23 = 12 2● = 13

Column Average ●1 = 21 ●2 = 14 ●3 = 16 ●● = 17

1 1 1 1

11 12 13

Interaction Model: . . 0

Halo Effect Example:

23 21 21 17 2 20 21 14 17 2

a b a b

ij i j i jij ij iji j i j

ij i j ij i j ij i jij

s t

21 22 23

20 21 16 17 0

19 23 21 17 2 8 13 14 17 2 12 13 16 17 0

Page 6: Two-Factor Studies with Equal Replication KNNL – Chapter 19
Page 7: Two-Factor Studies with Equal Replication KNNL – Chapter 19

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

Page 8: Two-Factor Studies with Equal Replication KNNL – Chapter 19

Two Factor ANOVA – Fixed Effects – Cell Means

2

Fixed Effects - All factor levels of interest are used in the experiment

Cell Means Model:

1,.., ; 1,..., ; 1,..., ;

mean when Factor at level , at ~ 0,

Matrix Fo

ijk ij ijk T

ij ijk

Y i a j b k n n abn

A i B j NID

111 111

112 112

121 11 121

122 12 122

211 21 211

212 22 212

221 221

222 222

rm 2, 2, 2 :

1 0 0 0

1 0 0 0

0 1 0 0

0 1 0 0

0 0 1 0

0 0 1 0

0 0 0 1

0 0 0 1

a b n

Y

Y

Y

Y

Y

Y

Y

Y

Y = Xβ+ε

11 111

11 112

12 121

12 122

21 211

21 212

22 221

22 222

T

2 2 2nσ Y = σ ε = σ I

Page 9: Two-Factor Studies with Equal Replication KNNL – Chapter 19

Two Factor ANOVA – Fixed Effects – Factor Effects

1 1

Fixed Effects - All factor levels of interest are used in the experiment

Factor Effects Model:

1,.., ; 1,..., ; 1,..., ;

1

ijk i j ijk Tij

a b

ij i i j ji j

ijij

Y i a j b k n n abn

ab

2

1 1

overall mean main effect of level of

main effect of level of

interaction of effect at level of and level of ~ 0,

i j

thi

thj

th thijkij

a b

i j iji j i

i A

j B

i A j B NID

1 1

2

0

~ , independent with

a b

ijj

ijk i j ij i jij ijY N

Page 10: Two-Factor Studies with Equal Replication KNNL – Chapter 19

Analysis of Variance – Least Squares/ML Estimators

1

1 1

Notation: Observation when @ , @ , replicate:

1Sample mean when @ , @ :

1Sample mean when @ :

1Sample mean when @ :

thijk

nij

ij ijkk

b ni

i ijkj k

j ijk

A i B j k Y

YA i B j Y Y

n n

YA i Y Y

bn bn

B j Y Yan

1 1

1 1 1

22

1 1 1 1 1 1

^

1Overall Mean:

Error Sum of Squares:

0 Least squares (and maximum likelihood) estimators:

ijk

a nj

i k

a b n

ijki j k

a b n a b n

ijk iji j k i j k

ijij

Y

bn

YY Y

abn abn

Q Y

Q

^ ^

^^ ^ ^

^

Fitted values: Residuals:

Factor Effects Model Estimators:

ij

ijk ij ijk ijijk ijk ijk

i j ij i ji j ij

ijk i j i

Y

Y Y e Y Y Y Y

Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y Y

j i j ijY Y Y Y

Page 11: Two-Factor Studies with Equal Replication KNNL – Chapter 19

Analysis of Variance – Sums of Squares

2 2 2

1 1 1 1 1 1 1 1 1

Cell Means Model:

1 1 1 1

Factor Effects Model:

ij ijijk ijk

a b n a b n a b n

ij ijijk ijki j k i j k i j k

TO T E T TR

Y Y Y Y Y Y

Y Y Y Y Y Y

SSTO SSE SSTR

df abn n df ab n n ab df ab

2 2 2

2 2

1 1 1

ij i j ij i jijk ijk

ij iijk ijki j k i j k i j k

j ij i j

i j k i j k

TO T E

Y Y Y Y Y Y Y Y Y Y Y Y

Y Y Y Y Y Y

Y Y Y Y Y Y

SSTO SSE SSA SSB SSAB

df abn n df ab n n

1 1 1 1

T

A B AB

ab

df a df b df a b

Page 12: Two-Factor Studies with Equal Replication KNNL – Chapter 19

Analysis of Variance – Expected Mean Squares

22

2

22

2 21 1

2

2

12

Factor Effects Model:

11

11

1 1

11

ijijk Ei j k

i Ai

a a

i ii i

j Bi

b

jj

SSESSE Y Y df ab n MSE E MSE

ab n

SSASSA bn Y Y df a MSA

a

bn bnE MSA

a a

SSBSSB an Y Y df b MSB

b

an

E MSB

2

12

2

22

2 2

1 1

1 1

1 1

1 1 1 1

b

jj

ij i j ABi j

ij i jiji j i j

an

b b

SSAB n Y Y Y Y df a b

SSABMSAB

a b

n n

E MSABa b a b

Page 13: Two-Factor Studies with Equal Replication KNNL – Chapter 19

ANOVA Table – F-TestsSource 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

0 11

* *0

Testing for Interaction Effects: : ... 0 for all ( , ) No Interaction

Test Statistic: Reject if .95; 1 1 , 1

Testing for Factor A Main E

ABij i jab

AB AB

H i j

MSABF H F F a b ab n

MSE

0 1

* *0

0 1

ffects: : ... 0 for all No Factor A Level Effects

Test Statistic: Reject if .95; 1, 1

Testing for Factor B Main Effects: : ... 0 fo

Aa i

A A

Bb j

H i

MSAF H F F a ab n

MSE

H

* *0

r all No Factor B Level Effects

Test Statistic: Reject if .95; 1, 1B B

j

MSBF H F F b ab n

MSE

Page 14: Two-Factor Studies with Equal Replication KNNL – Chapter 19

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

Page 15: Two-Factor Studies with Equal Replication KNNL – Chapter 19

Factor Effect Contrasts when No Interaction

1 1

^ ^2

1 1

^ ^

Contrasts among Levels of Factor : 0

Estimator: Estimated Standard Error:

1 100% CI for : 1 2 ; 1

Scheffe' Method for Many (or data-dri

a a

i i ii i

a a

ii ii i

A L c c

MSEL c Y s L c

bn

L L t ab n s L

^ ^

^ ^

^ ^

ven) tests: 1 1 ; 1, 1

Bonferroni Method for Pre-planned Tests: 1 / 2 ; 1

1Tukey Method for all Pairs of Factor Levels: 1 ; , 1

2

Similar Results for Factor , with

L a F a ab n s L

g L t g ab n s L

A L q a ab n s L

B a

^ ^2

1 1 1 1

and being "reversed" in all formulas:

0 b b b b

jj j j j jj j j j

b

MSEL c c L c Y s L c

an

Page 16: Two-Factor Studies with Equal Replication KNNL – Chapter 19

Factor Effect Contrasts when Interaction Present

1 1 1 1

^ ^2

1 1 1 1

^ ^

Contrasts among Cell Means : 0

Estimator: Estimated Standard Error:

1 100% CI for : 1 2 ; 1

Scheffe' Method for M

a b a b

ij ij iji j i j

a b a b

ijij iji j i j

L c c

MSEL c Y s L c

n

L L t ab n s L

^ ^

^ ^

^ ^

any (or data-driven) tests: 1 1 ; 1, 1

Bonferroni Method for Pre-planned Tests: 1 / 2 ; 1

1Tukey Method for all Pairs of Treatment Means: 1 ; , 1

2

L ab F ab ab n s L

g L t g ab n s L

L q ab ab n s L