Anthony Greene1 Advanced ANOVA 2-Way ANOVA Complex Factorial Designs I.The Factorial Design II.Partitioning The Variance For Multiple Effects III.Independent.

Post on 14-Dec-2015

223 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

Transcript

Anthony Greene 1

Advanced ANOVA 2-Way ANOVA

Complex Factorial Designs

I. The Factorial Design

II. Partitioning The Variance For Multiple Effects

III. Independent Main Effects of Factor A and Factor B

IV. Interactions

Anthony Greene 2

The Source Table• Keeps track of all data in complex ANOVA

designs

• Source of SS, df, and Variance (MS)– Partitioning the

SS, df and MS– All variability is attributable to

effect differences or error (all unexplained differences)

Total Variability

Effect Variability

(MS Between)

ErrorVariability

(MS Within)

Anthony Greene 3

Partitioning of Variability for Two-Way ANOVA

Total Variability

Effect Variability

(MS Between)

Error Variability

(MS Within)

Factor A Variability

Stage 1 {{Stage 2 Factor B

VariabilityInteraction Variability

4

Source Table for 1-Way ANOVA

Effect VariabilityError Variability

5

2-Way ANOVA

• Used when two variables (any number of levels) are crossed in a factorial design

• Factorial design allows the simultaneous manipulation of variables

A1 A2 A3 A4

B1 A1•B1 A2 • B1 A3 • B1 A4 • B1

B2 A1 • B2 A2 • B2 A3 • B2 A4• B2

6

2-Way ANOVA

For Example: Consider two treatments for mood disorders

1.This design allows us to consider multiple variables2.Importantly, it allows us to understand Interactions among variables

Placebo Prozac Zanex Bourbon

Depression A1•B1 A2 • B1 A3 • B1 A4 • B1

Anxiety A1 • B2 A2 • B2 A3 • B2 A4 • B2

7

2-Way ANOVA

Hypothetical Data:

1.You can see that the effects of the drug depend upon the disorder

2.This is referred to as an Interaction

Placebo Prozac Zanex Bourbon

Depression -2.3 0.2 -1.1 -3.2

Anxiety -2.0 -0.1 1.3 -1.6

-3.5

-3.0

-2.5-2.0

-1.5

-1.0

-0.5

0.0

0.51.0

1.5

2.0

Placebo Prozac Zanex Bourbon

DepressionAnxiety

8

Example of a 2-way ANOVA: Main Effect A

Daytime Heart rate

Nighttime Heart rate

No-Meditation 75 62

Mediation 74 63

60

65

70

75

80

Daytime Nightime

No Meditation

Meditation

9

Example of a 2-way ANOVA: Main Effect B

Daytime Heart rate

Nighttime Heart rate

No-Meditation 75 74

Mediation 64 63

60

65

70

75

80

Daytime Nightime

No Meditation

Meditation

10

Example of a 2-way ANOVA: Main Effect A & B

Daytime Heart rate

Nighttime Heart rate

No-Meditation 80 71

Mediation 71 60

60

65

70

75

80

85

Daytime Nightime

No Meditation

Meditation

11

Example of a 2-way ANOVA: InteractionDaytime Heart rate

Nighttime Heart rate

No-Meditation 75 62

Mediation 65 63

60

65

70

75

80

Daytime Nightime

No Meditation

Meditation

Anthony Greene 12

Partitioning of Variability for Two-Way ANOVA

Total Variability

Effect Variability

(MS Between)

Error Variability

(MS Within)

Factor A Variability

Stage 1 {{Stage 2 Factor B

VariabilityInteraction Variability

Anthony Greene 13

Partitioning of Variability for Two-Way ANOVA

Total Variability

Effect Variability

(MS Between)

Error Variability

(MS Within)

Factor A Variability

Stage 1 {{Stage 2 Factor B

VariabilityInteraction Variability

Numerator for Omnibus F-ratio

Denominator for all F-ratios

Anthony Greene 14

Partitioning of Variability for Two-Way ANOVA

Total Variability

Effect Variability

(MS Between)

Error Variability

(MS Within)

Factor A Variability

Stage 1 {{Stage 2 Factor B

VariabilityInteraction Variability

Numerator for Factor A F-ratio

Denominator for F-ratio

15

Partitioning of Variability for Two-Way ANOVA

Total Variability

Effect Variability

(MS Between)

Error Variability

(MS Within)

Factor A Variability

Stage 1 {{Stage 2 Factor B

VariabilityInteraction Variability

Numerator for Factor B F-ratio

Denominator for F-ratio

16

Partitioning of Variability for Two-Way ANOVA

Total Variability

Effect Variability

(MS Between)

Error Variability

(MS Within)

Factor A Variability

Stage 1 {{Stage 2 Factor B

VariabilityInteraction Variability

Numerator for Interaction F-ratio

Denominator for F-ratio

17

2 Main Types of Interactions

Anthony Greene 18

Simple Effects of An Interaction

0102030405060708090

100

B1 B2 B3 B4

A1A2A3

Anthony Greene 19

Simple Effects of An Interaction

0102030405060708090

100

B1 B2 B3 B4

A1

Anthony Greene 20

Simple Effects of An Interaction

0102030405060708090

100

B1 B2 B3 B4

A2

Anthony Greene 21

Simple Effects of An Interaction

0102030405060708090

100

B1 B2 B3 B4

A3

Anthony Greene 22

Simple Effects of An Interaction

0102030405060708090

100

B1 B2 B3 B4

A1A2A3

Anthony Greene 23

Simple Effects of An Interaction

010

2030

4050

6070

8090

100

B1

A1A2A3

Anthony Greene 24

Simple Effects of An Interaction

010

2030

4050

6070

8090

100

B2

A1A2A3

Anthony Greene 25

Simple Effects of An Interaction

010

2030

4050

6070

8090

100

B3

A1A2A3

Anthony Greene 26

Simple Effects of An Interaction

010

2030

4050

6070

8090

100

B4

A1A2A3

Anthony Greene 27

Anthony Greene 28

Anthony Greene 29

Anthony Greene 30

+

Anthony Greene 31

How To Make the Computations

A1 A2

B1 153

374

B2 254

324

A1 A2 RowTot

B1 TSS

TSS

TB1

B2 TSS

TSS

TB2

Col

Tot.

TA1 TA2

Anthony Greene 32

A1 A2 RowTotal

B1 TSS

TSS

TB1

B2 TSS

TSS

TB2

Col

Total

TA1 TA2

BAbtwAXB

BAbtwAXB

BB

BB

AA

AA

dfdfdfdf

SSSSSSSS

dfN

G

n

TSS

dfN

G

n

TSS

1-B) of levels of(number ,

1-A) of levels of(number ,

22

22

Anthony Greene 33

Higher Level ANOVAN-Way ANOVA: Any number of factorial variables may be crossed; for example, if you wanted to assess the effects of sleep deprivation:

1. Hours of sleep per night: 4, 5, 6, 7, 8

2. Age: 20-30, 30-40, 40-50, 50-60, 60-70

3. Gender: M, F

You would need fifty samples

Anthony Greene 34

Higher Level ANOVA

Mixed ANOVA: Any number of between subjects and repeated measures variables may be crossedFor example, if you wanted to assess the effects of sleep deprivation using sleep per night as the repeated measure:1. Hours of sleep per night: 4, 5, 6, 7, 82. Age: 20-30, 30-40, 40-50, 50-60, 60-703. Gender: M, FYou would need 10 samples

Anthony Greene 35

How to Do a Mixed Factorial DesignTotal

Variability

Effect Variability

(MS Between)

MS Within

Individual Variability

ErrorVariability

Stage 1 {{Stage 2 Factor A

VariabilityInteractionVariability

Factor BVariability

Anthony Greene 36

Two-Way ANOVAAn experimenter wants to assess the simultaneous effects of having breakfast and enough sleep on academic performance. Factor A is a breakfast vs. no breakfast condition. Factor B is three sleep conditions: 4 hours, 6 hours & 8 hours of sleep. Each condition has 5 subjects.

Anthony Greene 37

Two-Way ANOVA

Source d.f. SS MS F

Between 60

Main A 5

Main B

A x B 30

Within 2

Total

Factor A has 2 levels, Factor B has 3 levels, and n = 5 (i.e., six conditions are required and each has five subjects). Fill in the missing values.

Anthony Greene 38

Two-Way ANOVA

Source d.f. SS MS F

Between 5 60

Main A 1 5

Main B 2

A x B 30

Within 2

Total

First the obvious: The degrees freedom for A and B are the number of levels minus 1 . The degrees freedom Between is the number of conditions (6 = 2x3) minus 1.

Anthony Greene 39

Two-Way ANOVA

Source d.f. SS MS F

Between 5 60

Main A 1 5

Main B 2

A x B 2 30

Within 2

Total

The interaction (AxB) is then computed: d.f.Between = d.f.A + d.f.B + d.f.AxB. OR d.f.AxB = d.f.A d.f.B

Anthony Greene 40

Two-Way ANOVA

Source d.f. SS MS F

Between 5 60

Main A 1 5

Main B 2

A x B 2 30

Within 24 2

Total 29

d.f.Within= Σd.f. each cell

d.f.Total = N-1 = 29. d.f.Total= d.f.Between+ d.f.Within

Anthony Greene 41

Two-Way ANOVA

Source d.f. SS MS F

Between 5 60 12

Main A 1 5

Main B 2

A x B 2 30

Within 24 2

Total 29

Now you can compute MSBetween by dividing SS by d.f.

Anthony Greene 42

Two-Way ANOVA

Source d.f. SS MS F

Between 5 60 12

Main A 1 10 10 5

Main B 2

A x B 2 30

Within 24 2

Total 29

You can compute MSA by remembering that FA= MSA MSWithin, so 5 = ?/2. SSA is then found by remembering that MS = SS df,so 10 = ?/1

Anthony Greene 43

Two-Way ANOVA

Source d.f. SS MS F

Between 5 60 12

Main A 1 10 10 5

Main B 2 20 10

A x B 2 30 15

Within 24 2

Total 29

Now SSB is computed by SSA + SSB + SSAxB = SSBetween

MSB = SSB/dfB and MSAxB = SSAxB/dfAxB

Anthony Greene 44

Two-Way ANOVA

Source d.f. SS MS F

Between 5 60 12

Main A 1 10 10 5

Main B 2 20 10

A x B 2 30 15

Within 24 48 2

Total 29

MSWithin=SSWithin/dfWithin, solve for SS.

Anthony Greene 45

Two-Way ANOVA

Source d.f. SS MS F

Between 5 60 12 6

Main A 1 10 10 5

Main B 2 20 10 5

A x B 2 30 15 7.5

Within 24 48 2

Total 29

Now Solve for the missing F’s (Between, B, AxB). F=MS/MSWithin

Anthony Greene 46

Two-Way ANOVAAn experimenter is interested in the effects of efficacy on self-esteem. She theorizes that lack of efficacy will result in lower self-esteem. She also wants to find out if there is a different effect for females than for males. She conducts an experiment on a sample of college students, half male and half female. She then puts them through one of three experimental conditions: no efficacy, moderate efficacy, and high efficacy. Then she measures level of self-esteem. Her results are below. Conduct a two-way ANOVA. Report all significant findings with α= 0.05.

Anthony Greene 47

Data

No Moderate High Efficacy Efficacy Efficacy

1 4 7Males 3 8 8 0 7 10Females 2 10 16

5 7 134 8 15

Anthony Greene 48

No Moderate HighEfficacy Efficacy Efficacy

1 T=4 4 T=19 7 T=25Males 3 SS=4.6 8 SS=8.6 8 SS=4.7

0 7 10 Tm= 48Females 2 T=11 10 T=25 16 T=44

5 SS=4.6 7 SS=4.7 13 SS=4.7 Tf= 804 8 15Tne=15 Tme=44 The=69

n=3k=6N=18G=128∑x2=1260

Anthony Greene 49

SSbetween

SSbtw = ∑T2/n – G2/N

SSbtw = (42 + 192 + 252 + 112 + 252 + 442)/3 –282/18

SSbtw = 1228-910.2=317.8

Anthony Greene 50

SSsex, SSefficacy, SSinteractionSSsex = ∑T2sex/nsex – G2/N

SSsex = (482 + 802)/9 – 910.2

SSsex = 56.9

SSefficacy= ∑T2e/ne– G2/N

SSefficacy = (152 + 442 + 692)/6 – 910.2

SSefficacy = 243.47

SSinteraction = SSbetween – SSsex – SSefficacy

SSinteraction = 317.8-56.9-243.47

SSinteraction = 17.43

Anthony Greene 51

SSwithin and SStotal

SSwithin = ∑SS

SSwithin=4.6+8.6+4.7+4.6+4.7+4.7=31.9

SStotal = ∑x2 – (∑x)2/N

SStotal = 1260 – 910.2

SStotal = 349.8

Anthony Greene 52

Degrees Freedom

dfbtw = cells – 1 = k-1

dfsex = rows - 1

dfeff = columns - 1

dfint = dfbtw – dfsex - dfeff

dfwin = Σdfeach cell = dftot-dfbtw

dftot = N-1 = nk-1

Anthony Greene 53

Degrees Freedom

dfbtw = cells – 1 = k-1 = 5

dfsex = rows – 1 = 1

dfeff = columns – 1 = 2

dfint = dfbtw – dfsex – dfeff = dfsex dfeff = 2

dfwin = Σdfeach cell = dftot-dfbtw = 12

dftot = N-1= nk-1= 17

54

Source TableSource SS df MS F Fcrit

Between 317.8

Sex 56.9

Efficacy 243.5

Int. 17. 4

Within 31. 9

Total 349.8

55

Source TableSource SS df MS F Fcrit

Between 317.8 5

Sex 56.9 1

Efficacy 243.5 2

Int. 17. 4 2

Within 31. 9 12

Total 349.8 17

56

Source TableSource SS df MS F Fcrit

Between 317.8 5 63.6

Sex 56.9 1 56.9

Efficacy 243.5 2 121.7

Int. 17. 4 2 8.7

Within 31. 9 12 2.7

Total 349.8 17

57

Source TableSource SS df MS F Fcrit

Between 317.8 5 63.6 23.5 F(5,12)=3.11

Sex 56.9 1 56.9 21.4 F(1,12)=4.75

Efficacy 243.5 2 121.7 45.8 F(2,12)=3.88

Int. 17. 4 2 8.7 3.3 F(2,12)=3.88

Within 31. 9 12 2.7

Total 349.8 17

58

Source TableSource SS df MS F Fcrit

Between 317.8 5 63.6 23.5 F(5,12)=3.11

Sex 56.9 1 56.9 21.4 F(1,12)=4.75

Efficacy 243.5 2 121.7 45.8 F(2,12)=3.88

Int. 17. 4 2 8.7 3.3 F(2,12)=3.88

Within 31. 9 12 2.7

Total 349.8 17

1 main effect for sex2 main effect for efficacy 3 no significant interaction

top related