/
Linear Models Two-Way ANOVA Linear Models Two-Way ANOVA

Linear Models Two-Way ANOVA - PowerPoint Presentation

pamella-moone
pamella-moone . @pamella-moone
Follow
347 views
Uploaded On 2019-06-26

Linear Models Two-Way ANOVA - PPT Presentation

LM ANOVA 2 2 Example Background Bacteria effect of temperature 10 o C amp 15 o C and relative humidity 20 40 60 80 on growth rate cellsd 120 petri dishes with a growth ID: 760367

effect anova factor main anova effect main factor interaction effectfactor row relative level effects humidity column temperature treatment means

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Linear Models Two-Way ANOVA" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Linear Models

Two-Way ANOVA

Slide2

LM ANOVA 2

2

Example -- Background

Bacteria -- effect

of temperature (10

o

C & 15

o

C) and relative humidity (20%, 40%, 60%, 80%) on growth rate (cells/d

).

120

petri

dishes with a growth

medium available

Growth

chambers where all environmental variables can be controlled.

What is the response variable, factor(s), level(s), treatment(s), replicates per treatment?

Slide3

LM ANOVA 2

3

Factorial or Crossed Design

Each treatment is a combination of both factors.

Relative Humidity

20%

40%

60%

80%

Temp

10

o

C

15

o

C

Slide4

LM ANOVA 2

4

Factorial or Crossed Design

Advantages (over two OFAT experiments)Efficiency – each individual “gives information” about each level of BOTH factors.

Relative Humidity20%40%60%80%Temp10oC1515151515oC15151515

TempRelative Humidity10oC15oC20%40%60%80%202020202020

OFAT

Slide5

LM ANOVA 2

5

Factorial or Crossed Design

Advantages (over two OFAT experiments)

Efficiency

each individual

gives

information” about each level of BOTH factors.

Power

– increased due to increased effective n.

Effect Size

– detect smaller

differences

Interaction effect

– can be detected.

Slide6

LM ANOVA 2

6

Interaction Effect

Effect of one factor on the response variable differs depending on level of the other factor.

Relative Humidity

20%

40%

60%

80%

Temp

10

o

C

7

10

13

15

15

o

C

14

12

11

8

Slide7

LM ANOVA 2

7

No Interaction Effect

Relative Humidity

20%

40%

60%

80%

Temp

10

o

C

7

10

13

15

15

o

C

6

9

12

14

Slide8

LM ANOVA 2

8

Main Effects

Differences in “level” means for a factor“Strong” relative humidity main effect“Weak” temperature main effect.

Relative Humidity20%40%60%80%Temp10oC710131515oC691214

6.5

9.5

12.5

14.5

11.25

10.25

Slide9

LM ANOVA 2

9

Main Effects

“Strong” relative humidity main effect

“Weak” temperature main effect.

Slide10

LM ANOVA 2

10

Interaction Effect

Slide11

LM ANOVA 2

11

Humidity and Temperature Effects

Slide12

LM ANOVA 2

12

Humidity Effect Only

Slide13

LM ANOVA 2

13

Temperature Effect Only

Slide14

LM ANOVA 2

14

No Effects

Slide15

LM ANOVA 2

15

Example #1

Interaction Effect

Factor 1 Main EffectFactor 2 Main Effect

×

Slide16

LM ANOVA 2

16

Example #2

Interaction Effect

Factor 1 Main EffectFactor 2 Main Effect

×

×

Slide17

LM ANOVA 2

17

Interaction Effect

Factor 1 Main EffectFactor 2 Main Effect

Example #3

Slide18

LM ANOVA 2

18

Example

#4

Interaction EffectFactor 1 Main EffectFactor 2 Main Effect

×

×

Slide19

LM ANOVA 2

19

Interaction Effect

Factor 1 Main EffectFactor 2 Main Effect

Example #5

Slide20

LM ANOVA 2

20

Interaction Effect

Factor 1 Main EffectFactor 2 Main Effect

Example #6

Slide21

LM ANOVA 2

21

Example #7

Interaction Effect

Factor 1 Main EffectFactor 2 Main Effect

×

Slide22

LM ANOVA 2

22

Interaction Effect

Factor 1 Main EffectFactor 2 Main Effect

Example #8

Slide23

LM ANOVA 2

23

Example #9

Interaction Effect

Factor 1 Main EffectFactor 2 Main Effect

×

×

Slide24

LM ANOVA 2

24

Interaction Effect

Factor 1 Main EffectFactor 2 Main Effect

Example #10

Slide25

LM ANOVA 2

25

Terminology / Symbols

One factor

is “row”

factor

r = number of

levels

Other

factor is

“column”

factor

c = number of

levels

Y

ijk

=

response

variable

for

k

th

individual in

i

th

level of row factor and

j

th

level of column

factor

for

simplicity, assume n is same for all

i,j

Slide26

LM ANOVA 2

26

Terminology / Symbols

Column Factor12…cRow Factor1…2…………………r……

`Y11.

`Y12.

`Y1c.

`Y21.

`Y22.

`Y2c.

`Yr1.

`Yr2.

`Yrc.

`Y.1.

`Y.c.

`Y.2.

`Y1..

`Y2..

`Yr..

`Y...

Treatment means

Level means

Grand mean

Slide27

LM ANOVA 2

27

2-Way ANOVA Purpose

D

etermine significance

of

interaction and, if appropriate, two

main

effects.

Are differences

in

means

“different enough” given sampling

variability?

Slide28

LM ANOVA 2

28

2-Way ANOVA Calculations

MS

Within

is variability about

ultimate full

model

MS

Total

is variability about

ultimate simple

model

if

MS

Among

is large relative to

MS

Within

then

ultimate full

model is

warranted

i.e

., some

difference in treatment means

implies differences due to row factor, column factor, or interaction between the two

SS

Among

=

SS

Row

+

SS

Col

+

SS

Interaction

If

MS

Row

is large relative to

MS

Within

then a difference due to the row factor is indicated

Similar argument for column and interaction effects

Slide29

LM ANOVA 2

29

2-Way ANOVA Calculations

SS

Among

= SS

Row

+ SS

Column

+ SS

Interaction

Slide30

LM ANOVA 2

30

2-Way ANOVA Calculations

SS

Row

=

cn

(

)

å

=

-

r

1

i

2

...

..

i

Y

Y

SS

Column

=

rn

(

)

å

=

-

c

1

i

2

...

. .

j

Y

Y

Column Factor

1

2…cRow Factor1…2…………………r……

`Y11.

`Y12.

`Y1c.

`Y21.

`Y22.

`Y2c.

`Yr1.

`Yr2.

`Yrc.

`Y.1.

`Y.c.

`Y.2.

`Y1..

`Y2..

`Yr..

`

Y

...

Slide31

LM ANOVA 2

31

Two-Way ANOVA Table

Source

df

SS

MS

F

.

Row

r-1

SS

Row

SS

Row

/[r-1]

MS

Row

/

MS

Within

Column

c-1

SS

Col

SS

Col

/[c-1]

MS

Col

/

MS

Within

Inter

(r-1)(c-1

)

SS

Int

SS

Int

/[(r-1)(c-1)]

MS

Int

/

MS

Within

Within

rc

(n-1)

SS

Within

SS

Within

/[

rc

(n-1)]

Total rcn-1

SS

Total

Slide32

LM ANOVA 2

32

Example

What is the optimal temperature (27,35,43oC) and concentration (0.6,0.8,1.0,1.2,1.4% by weight) of the nutrient, tryptone, for culturing the Staphylococcus aureus bacterium. Each treatment was repeated twice. The number of bacteria was recorded in millions CFU/mL (CFU=Colony Forming Units).

Slide33

LM ANOVA 2

33

Example -- Bacteria

Concentration0.60.81.01.21.4Temp2710231056160267131153358816117023019916943134166136209164162108144155235164161

What kind of effects are apparent?

Slide34

LM ANOVA 2

34

Example -- Bacteria

What kind of effects are apparent?

Slide35

LM ANOVA 2

35

Example -- ANOVA

Analysis of Variance TableResponse: cells Df Sum Sq Mean Sq F value Pr(>F) ftemp 2 1313 656 0.8557 0.44473 fconc 4 51596 12899 16.8154 2.041e-05ftemp:fconc 8 14703 1838 2.3958 0.06886 Residuals 15 11507 767

Weak Interaction; Nonsignificant

Significant concentration effect

Nonsignificant

temperature effect

Slide36

LM ANOVA 2

36

Example -- ANOVA

Slide37

LM ANOVA 2

37

Example -- ANOVA

Linear Hypotheses: Estimate Std. Error t value p value 0.8 - 0.6 == 0 36.00 15.99 2.251 0.2144 1 - 0.6 == 0 46.67 15.99 2.918 0.0680 . 1.2 - 0.6 == 0 126.83 15.99 7.932 <0.01 ***1.4 - 0.6 == 0 56.17 15.99 3.512 0.0226 * 1 - 0.8 == 0 10.67 15.99 0.667 0.9611 1.2 - 0.8 == 0 90.83 15.99 5.680 <0.01 ***1.4 - 0.8 == 0 20.17 15.99 1.261 0.7195 1.2 - 1 == 0 80.17 15.99 5.013 <0.01 ** 1.4 - 1 == 0 9.50 15.99 0.594 0.9737 1.4 - 1.2 == 0 -70.67 15.99 -4.419 <0.01 **

0.6 0.8 1.0 1.4 1.2

Slide38

LM ANOVA 2

38

Example -- ANOVA

a

ab

ab

c

b

0.6 0.8 1.0 1.4 1.2

a

a

Slide39

Review Handout – Example 1

lm()anova()glht()fitPlot()addSigLetters()

LM ANOVA 2

39

Slide40

LM ANOVA 2

40

Assumptions and Checking in R

Same as for

the one-way

ANOVA

Slide41

LM ANOVA 2

41

Example

Measured soil phosphorous levels in plots near Sydney, Australia.

Each plot was characterized by type of soil (shale- or sandstone-derived) and “topographic” location (valley, north, south, or hillside).

Data in

SoilPhosphorous.txt

Does mean soil phosphorous level differ by soil type or topographic location?

Is there an interaction effect?