Factorial Designs Merlise Clyde Design of Experiments: Chapter 6 - - PowerPoint PPT Presentation

factorial designs
SMART_READER_LITE
LIVE PREVIEW

Factorial Designs Merlise Clyde Design of Experiments: Chapter 6 - - PowerPoint PPT Presentation

Factorial Designs Merlise Clyde Design of Experiments: Chapter 6 Duke University March 2, 2016 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TIME: timing of


slide-1
SLIDE 1

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Factorial Designs

Merlise Clyde Design of Experiments: Chapter 6

Duke University

March 2, 2016

slide-2
SLIDE 2

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Meadow Foam Data

Interested in flower production of MeadowFoam in response to 2 factors:

▶ INTENSITY: light intensity at 6 levels: {150, 300, 450, 600, 750,

900} TIME: timing of onset of LIGHT treatment

Late (at Photoperiod Floral Induction (PFI)) Early (24 days before PFI)

Response variable: FLOWERS, the average number of flowers produced by the seedlings Possible Experimental Designs: Perform two separate CRD experients, one to test for effects of INENSITY and the other for TIMING. But Which TIME to use for testing the INTENSITY effects? Which INTENSITY to use for testing the TIME effects? T

  • compare different INTENSITY x TIME combinations we need to

do experiments with all 12 treatment combinations.

slide-3
SLIDE 3

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Meadow Foam Data

Interested in flower production of MeadowFoam in response to 2 factors:

▶ INTENSITY: light intensity at 6 levels: {150, 300, 450, 600, 750,

900}

▶ TIME: timing of onset of LIGHT treatment

Late (at Photoperiod Floral Induction (PFI)) Early (24 days before PFI)

Response variable: FLOWERS, the average number of flowers produced by the seedlings Possible Experimental Designs: Perform two separate CRD experients, one to test for effects of INENSITY and the other for TIMING. But Which TIME to use for testing the INTENSITY effects? Which INTENSITY to use for testing the TIME effects? T

  • compare different INTENSITY x TIME combinations we need to

do experiments with all 12 treatment combinations.

slide-4
SLIDE 4

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Meadow Foam Data

Interested in flower production of MeadowFoam in response to 2 factors:

▶ INTENSITY: light intensity at 6 levels: {150, 300, 450, 600, 750,

900}

▶ TIME: timing of onset of LIGHT treatment

▶ Late (at Photoperiod Floral Induction (PFI))

Early (24 days before PFI)

Response variable: FLOWERS, the average number of flowers produced by the seedlings Possible Experimental Designs: Perform two separate CRD experients, one to test for effects of INENSITY and the other for TIMING. But Which TIME to use for testing the INTENSITY effects? Which INTENSITY to use for testing the TIME effects? T

  • compare different INTENSITY x TIME combinations we need to

do experiments with all 12 treatment combinations.

slide-5
SLIDE 5

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Meadow Foam Data

Interested in flower production of MeadowFoam in response to 2 factors:

▶ INTENSITY: light intensity at 6 levels: {150, 300, 450, 600, 750,

900}

▶ TIME: timing of onset of LIGHT treatment

▶ Late (at Photoperiod Floral Induction (PFI)) ▶ Early (24 days before PFI)

Response variable: FLOWERS, the average number of flowers produced by the seedlings Possible Experimental Designs: Perform two separate CRD experients, one to test for effects of INENSITY and the other for TIMING. But Which TIME to use for testing the INTENSITY effects? Which INTENSITY to use for testing the TIME effects? T

  • compare different INTENSITY x TIME combinations we need to

do experiments with all 12 treatment combinations.

slide-6
SLIDE 6

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Meadow Foam Data

Interested in flower production of MeadowFoam in response to 2 factors:

▶ INTENSITY: light intensity at 6 levels: {150, 300, 450, 600, 750,

900}

▶ TIME: timing of onset of LIGHT treatment

▶ Late (at Photoperiod Floral Induction (PFI)) ▶ Early (24 days before PFI)

▶ Response variable: FLOWERS, the average number of flowers

produced by the seedlings Possible Experimental Designs: Perform two separate CRD experients, one to test for effects of INENSITY and the other for TIMING. But Which TIME to use for testing the INTENSITY effects? Which INTENSITY to use for testing the TIME effects? T

  • compare different INTENSITY x TIME combinations we need to

do experiments with all 12 treatment combinations.

slide-7
SLIDE 7

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Meadow Foam Data

Interested in flower production of MeadowFoam in response to 2 factors:

▶ INTENSITY: light intensity at 6 levels: {150, 300, 450, 600, 750,

900}

▶ TIME: timing of onset of LIGHT treatment

▶ Late (at Photoperiod Floral Induction (PFI)) ▶ Early (24 days before PFI)

▶ Response variable: FLOWERS, the average number of flowers

produced by the seedlings Possible Experimental Designs: Perform two separate CRD experients, one to test for effects of INENSITY and the other for TIMING. But Which TIME to use for testing the INTENSITY effects? Which INTENSITY to use for testing the TIME effects? T

  • compare different INTENSITY x TIME combinations we need to

do experiments with all 12 treatment combinations.

slide-8
SLIDE 8

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Meadow Foam Data

Interested in flower production of MeadowFoam in response to 2 factors:

▶ INTENSITY: light intensity at 6 levels: {150, 300, 450, 600, 750,

900}

▶ TIME: timing of onset of LIGHT treatment

▶ Late (at Photoperiod Floral Induction (PFI)) ▶ Early (24 days before PFI)

▶ Response variable: FLOWERS, the average number of flowers

produced by the seedlings Possible Experimental Designs: Perform two separate CRD experients, one to test for effects of INENSITY and the other for TIMING. But

▶ Which TIME to use for testing the INTENSITY effects?

Which INTENSITY to use for testing the TIME effects? T

  • compare different INTENSITY x TIME combinations we need to

do experiments with all 12 treatment combinations.

slide-9
SLIDE 9

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Meadow Foam Data

Interested in flower production of MeadowFoam in response to 2 factors:

▶ INTENSITY: light intensity at 6 levels: {150, 300, 450, 600, 750,

900}

▶ TIME: timing of onset of LIGHT treatment

▶ Late (at Photoperiod Floral Induction (PFI)) ▶ Early (24 days before PFI)

▶ Response variable: FLOWERS, the average number of flowers

produced by the seedlings Possible Experimental Designs: Perform two separate CRD experients, one to test for effects of INENSITY and the other for TIMING. But

▶ Which TIME to use for testing the INTENSITY effects? ▶ Which INTENSITY to use for testing the TIME effects?

T

  • compare different INTENSITY x TIME combinations we need to

do experiments with all 12 treatment combinations.

slide-10
SLIDE 10

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Meadow Foam Data

Interested in flower production of MeadowFoam in response to 2 factors:

▶ INTENSITY: light intensity at 6 levels: {150, 300, 450, 600, 750,

900}

▶ TIME: timing of onset of LIGHT treatment

▶ Late (at Photoperiod Floral Induction (PFI)) ▶ Early (24 days before PFI)

▶ Response variable: FLOWERS, the average number of flowers

produced by the seedlings Possible Experimental Designs: Perform two separate CRD experients, one to test for effects of INENSITY and the other for TIMING. But

▶ Which TIME to use for testing the INTENSITY effects? ▶ Which INTENSITY to use for testing the TIME effects?

To compare different INTENSITY x TIME combinations we need to do experiments with all 12 treatment combinations.

slide-11
SLIDE 11

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Experimental Design

Each of the 12 combinations assigned to a group of 10 plants, replicated twice Layout TIME 150 300 450 600 750 900 Late

L 150 L 300 L 450 L 600 L 750 L 900

Early

E 150 E 300 E 450 E 600 E 750 E 900

This type of design is called a factorial design. It is a 2 6 two factor design with 2 replicates per treatment combination Factor Categories of treatments Levels of a factor The different treatments in a category levels(mf$Time)

slide-12
SLIDE 12

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Experimental Design

Each of the 12 combinations assigned to a group of 10 plants, replicated twice Layout TIME 150 300 450 600 750 900 Late yL,150 yL,300 yL,450 yL,600 yL,750 yL,900 Early yE,150 yE,300 yE,450 yE,600 yE,750 yE,900 This type of design is called a factorial design. It is a 2 6 two factor design with 2 replicates per treatment combination Factor Categories of treatments Levels of a factor The different treatments in a category levels(mf$Time)

slide-13
SLIDE 13

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Experimental Design

Each of the 12 combinations assigned to a group of 10 plants, replicated twice Layout TIME 150 300 450 600 750 900 Late yL,150 yL,300 yL,450 yL,600 yL,750 yL,900 Early yE,150 yE,300 yE,450 yE,600 yE,750 yE,900 This type of design is called a factorial design. It is a 2 6 two factor design with 2 replicates per treatment combination Factor Categories of treatments Levels of a factor The different treatments in a category levels(mf$Time)

slide-14
SLIDE 14

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Experimental Design

Each of the 12 combinations assigned to a group of 10 plants, replicated twice Layout TIME 150 300 450 600 750 900 Late yL,150 yL,300 yL,450 yL,600 yL,750 yL,900 Early yE,150 yE,300 yE,450 yE,600 yE,750 yE,900 This type of design is called a factorial design. It is a 2 × 6 two factor design with 2 replicates per treatment combination Factor Categories of treatments Levels of a factor The different treatments in a category levels(mf$Time)

slide-15
SLIDE 15

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Experimental Design

Each of the 12 combinations assigned to a group of 10 plants, replicated twice Layout TIME 150 300 450 600 750 900 Late yL,150 yL,300 yL,450 yL,600 yL,750 yL,900 Early yE,150 yE,300 yE,450 yE,600 yE,750 yE,900 This type of design is called a factorial design. It is a 2 × 6 two factor design with 2 replicates per treatment combination Factor Categories of treatments Levels of a factor The different treatments in a category levels(mf$Time)

slide-16
SLIDE 16

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Experimental Design

Each of the 12 combinations assigned to a group of 10 plants, replicated twice Layout TIME 150 300 450 600 750 900 Late yL,150 yL,300 yL,450 yL,600 yL,750 yL,900 Early yE,150 yE,300 yE,450 yE,600 yE,750 yE,900 This type of design is called a factorial design. It is a 2 × 6 two factor design with 2 replicates per treatment combination Factor Categories of treatments Levels of a factor The different treatments in a category levels(mf$Time)

slide-17
SLIDE 17

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Experimental Design

Each of the 12 combinations assigned to a group of 10 plants, replicated twice Layout TIME 150 300 450 600 750 900 Late yL,150 yL,300 yL,450 yL,600 yL,750 yL,900 Early yE,150 yE,300 yE,450 yE,600 yE,750 yE,900 This type of design is called a factorial design. It is a 2 × 6 two factor design with 2 replicates per treatment combination Factor Categories of treatments Levels of a factor The different treatments in a category levels(mf$Time)

slide-18
SLIDE 18

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Marginal Plots

150 300 450 600 750 900 30 40 50 60 70 Intensity Flowers 1 2 30 40 50 60 70 Time Flowers

slide-19
SLIDE 19

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Conditional Plots

coplot(Flowers ∼ Intensity | Time, data=mf)

  • 150

300 450 600 750 900 30 40 50 60 70

  • 150

300 450 600 750 900

Intensity Flowers

1 2

Given : factor(Time)

slide-20
SLIDE 20

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Goals

▶ What is the effect of differing light conditions?

What is the effect of timing on flower production? (one CRD) Does the effect of light intensity depend on the timing? What is the best combination?

slide-21
SLIDE 21

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Goals

▶ What is the effect of differing light conditions? ▶ What is the effect of timing on flower production? (one CRD)

Does the effect of light intensity depend on the timing? What is the best combination?

slide-22
SLIDE 22

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Goals

▶ What is the effect of differing light conditions? ▶ What is the effect of timing on flower production? (one CRD) ▶ Does the effect of light intensity depend on the timing?

What is the best combination?

slide-23
SLIDE 23

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Goals

▶ What is the effect of differing light conditions? ▶ What is the effect of timing on flower production? (one CRD) ▶ Does the effect of light intensity depend on the timing? ▶ What is the best combination?

slide-24
SLIDE 24

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Possible Analyses

Lets try to analyize the data with our existing tools: Two One-Factor ANOVAS just looking at Time, the experiment is a one-factor ANOVA with 2 treatment levels and 12 reps per treatment. just looking at Intensity, the experiment is a one-factor ANOVA with 6 treatment levels and 4 reps per treatment. > anova(lm(Flowers ~ Time, data=mf)) Df Sum Sq Mean Sq F value Pr(>F) Time 1 887 886.95 5.6543 0.02653 * Residuals 22 3451 156.86 > anova(lm(Flowers ~ Intensity, data=mf)) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.5 536.70 5.8393 0.002244 ** Residuals 18 1654.4 91.91

slide-25
SLIDE 25

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Possible Analyses

Lets try to analyize the data with our existing tools: Two One-Factor ANOVAS

▶ just looking at Time, the experiment is a one-factor ANOVA

with 2 treatment levels and 12 reps per treatment. just looking at Intensity, the experiment is a one-factor ANOVA with 6 treatment levels and 4 reps per treatment. > anova(lm(Flowers ~ Time, data=mf)) Df Sum Sq Mean Sq F value Pr(>F) Time 1 887 886.95 5.6543 0.02653 * Residuals 22 3451 156.86 > anova(lm(Flowers ~ Intensity, data=mf)) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.5 536.70 5.8393 0.002244 ** Residuals 18 1654.4 91.91

slide-26
SLIDE 26

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Possible Analyses

Lets try to analyize the data with our existing tools: Two One-Factor ANOVAS

▶ just looking at Time, the experiment is a one-factor ANOVA

with 2 treatment levels and 12 reps per treatment.

▶ just looking at Intensity, the experiment is a one-factor ANOVA

with 6 treatment levels and 4 reps per treatment. > anova(lm(Flowers ~ Time, data=mf)) Df Sum Sq Mean Sq F value Pr(>F) Time 1 887 886.95 5.6543 0.02653 * Residuals 22 3451 156.86 > anova(lm(Flowers ~ Intensity, data=mf)) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.5 536.70 5.8393 0.002244 ** Residuals 18 1654.4 91.91

slide-27
SLIDE 27

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Possible Analyses

Lets try to analyize the data with our existing tools: Two One-Factor ANOVAS

▶ just looking at Time, the experiment is a one-factor ANOVA

with 2 treatment levels and 12 reps per treatment.

▶ just looking at Intensity, the experiment is a one-factor ANOVA

with 6 treatment levels and 4 reps per treatment. > anova(lm(Flowers ~ Time, data=mf)) Df Sum Sq Mean Sq F value Pr(>F) Time 1 887 886.95 5.6543 0.02653 * Residuals 22 3451 156.86 > anova(lm(Flowers ~ Intensity, data=mf)) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.5 536.70 5.8393 0.002244 ** Residuals 18 1654.4 91.91

slide-28
SLIDE 28

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

And Another Oneway ANOVA

A one-factor ANOVA with 2 × 6 = 12 treatments: > anova(lm(Flowers ~ Intensity:Time, data=mf)) Analysis of Variance Table Response: Flowers Df Sum Sq Mean Sq F value Pr(>F) Intensity:Time 11 3682.0 334.73 6.1238 0.002028 ** Residuals 12 655.9 54.66

  • >
slide-29
SLIDE 29

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

And Another Oneway ANOVA

A one-factor ANOVA with 2 × 6 = 12 treatments: > anova(lm(Flowers ~ Intensity:Time, data=mf)) Analysis of Variance Table Response: Flowers Df Sum Sq Mean Sq F value Pr(>F) Intensity:Time 11 3682.0 334.73 6.1238 0.002028 ** Residuals 12 655.9 54.66

  • >
slide-30
SLIDE 30

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Why might these be insufficient?

▶ What are the SSE and MSE representing in the first two

ANOVAS? Why are they bigger than the value in the third ANOVA? In the third ANOVA, can we assess the effects of Time and Intensity separately? Can you think of a situation where the F-stats in the first and second ANOVAs would be “small”, but the F-stat in the third ANOVA “big”? The first and second may mischaracterize the data and sources of variation. The third is valid, but we would like a more specific result: which factors are sources of variation and the relative magnitude of their effects If the effects of one factor are consisten across levels of the other maybe we do not need to have a separate parameter for each of the 12 treatment combinations

slide-31
SLIDE 31

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Why might these be insufficient?

▶ What are the SSE and MSE representing in the first two

ANOVAS? Why are they bigger than the value in the third ANOVA?

▶ In the third ANOVA, can we assess the effects of Time and

Intensity separately? Can you think of a situation where the F-stats in the first and second ANOVAs would be “small”, but the F-stat in the third ANOVA “big”? The first and second may mischaracterize the data and sources of variation. The third is valid, but we would like a more specific result: which factors are sources of variation and the relative magnitude of their effects If the effects of one factor are consisten across levels of the other maybe we do not need to have a separate parameter for each of the 12 treatment combinations

slide-32
SLIDE 32

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Why might these be insufficient?

▶ What are the SSE and MSE representing in the first two

ANOVAS? Why are they bigger than the value in the third ANOVA?

▶ In the third ANOVA, can we assess the effects of Time and

Intensity separately?

▶ Can you think of a situation where the F-stats in the first and

second ANOVAs would be “small”, but the F-stat in the third ANOVA “big”? The first and second may mischaracterize the data and sources of variation. The third is valid, but we would like a more specific result: which factors are sources of variation and the relative magnitude of their effects If the effects of one factor are consisten across levels of the other maybe we do not need to have a separate parameter for each of the 12 treatment combinations

slide-33
SLIDE 33

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Why might these be insufficient?

▶ What are the SSE and MSE representing in the first two

ANOVAS? Why are they bigger than the value in the third ANOVA?

▶ In the third ANOVA, can we assess the effects of Time and

Intensity separately?

▶ Can you think of a situation where the F-stats in the first and

second ANOVAs would be “small”, but the F-stat in the third ANOVA “big”? The first and second may mischaracterize the data and sources of variation. The third is valid, but we would like a more specific result: which factors are sources of variation and the relative magnitude of their effects If the effects of one factor are consisten across levels of the other maybe we do not need to have a separate parameter for each of the 12 treatment combinations

slide-34
SLIDE 34

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Why might these be insufficient?

▶ What are the SSE and MSE representing in the first two

ANOVAS? Why are they bigger than the value in the third ANOVA?

▶ In the third ANOVA, can we assess the effects of Time and

Intensity separately?

▶ Can you think of a situation where the F-stats in the first and

second ANOVAs would be “small”, but the F-stat in the third ANOVA “big”? The first and second may mischaracterize the data and sources of variation. The third is valid, but we would like a more specific result: which factors are sources of variation and the relative magnitude of their effects If the effects of one factor are consisten across levels of the other maybe we do not need to have a separate parameter for each of the 12 treatment combinations

slide-35
SLIDE 35

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Why might these be insufficient?

▶ What are the SSE and MSE representing in the first two

ANOVAS? Why are they bigger than the value in the third ANOVA?

▶ In the third ANOVA, can we assess the effects of Time and

Intensity separately?

▶ Can you think of a situation where the F-stats in the first and

second ANOVAs would be “small”, but the F-stat in the third ANOVA “big”? The first and second may mischaracterize the data and sources of variation. The third is valid, but we would like a more specific result: which factors are sources of variation and the relative magnitude of their effects If the effects of one factor are consisten across levels of the other maybe we do not need to have a separate parameter for each of the 12 treatment combinations

slide-36
SLIDE 36

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Two Way Additive Effects Model

Model Yijk = µjk + ϵijk Rewrite mean as “MAIN” effects

jk j k jk jk is the population mean in group with Time at level j and

Intensity at level k

  • verall mean

j j

1 2 additive effects of Time of PFI

k k

1 2 6 additive effects of Intensity i 1 2 (replicate)

slide-37
SLIDE 37

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Two Way Additive Effects Model

Model Yijk = µjk + ϵijk Rewrite mean as “MAIN” effects µjk = µ + αj + βk + γjk

jk is the population mean in group with Time at level j and

Intensity at level k

  • verall mean

j j

1 2 additive effects of Time of PFI

k k

1 2 6 additive effects of Intensity i 1 2 (replicate)

slide-38
SLIDE 38

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Two Way Additive Effects Model

Model Yijk = µjk + ϵijk Rewrite mean as “MAIN” effects µjk = µ + αj + βk + γjk

▶ µjk is the population mean in group with Time at level j and

Intensity at level k

  • verall mean

j j

1 2 additive effects of Time of PFI

k k

1 2 6 additive effects of Intensity i 1 2 (replicate)

slide-39
SLIDE 39

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Two Way Additive Effects Model

Model Yijk = µjk + ϵijk Rewrite mean as “MAIN” effects µjk = µ + αj + βk + γjk

▶ µjk is the population mean in group with Time at level j and

Intensity at level k

▶ µ overall mean ▶ αj j = 1, 2 additive effects of Time of PFI k k

1 2 6 additive effects of Intensity i 1 2 (replicate)

slide-40
SLIDE 40

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Two Way Additive Effects Model

Model Yijk = µjk + ϵijk Rewrite mean as “MAIN” effects µjk = µ + αj + βk + γjk

▶ µjk is the population mean in group with Time at level j and

Intensity at level k

▶ µ overall mean ▶ αj j = 1, 2 additive effects of Time of PFI ▶ βk k = 1, 2, . . . , 6 additive effects of Intensity

i 1 2 (replicate)

slide-41
SLIDE 41

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Two Way Additive Effects Model

Model Yijk = µjk + ϵijk Rewrite mean as “MAIN” effects µjk = µ + αj + βk + γjk

▶ µjk is the population mean in group with Time at level j and

Intensity at level k

▶ µ overall mean ▶ αj j = 1, 2 additive effects of Time of PFI ▶ βk k = 1, 2, . . . , 6 additive effects of Intensity ▶ i = 1, 2 (replicate)

slide-42
SLIDE 42

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Commments on Parameterization

  • 1. Side conditions: As with the oneway model, we need only Jf − 1

parameters to differentiate between Jf means so in Rwe usually

set

1 1

0 (set to zero side condition) or; set

j j

0,

k k

0 (sum to zero side condition)

  • 2. Model Limitations: The additive mmodel is a Reduced Model

there are J1 J2 groups or treatment combinations a full model fits a population mean separately for each treatment combination this would require J1 J2 parameters

In contrast the additive model has only 1 J1 1 J2 1 J1 J2 1 parameters

slide-43
SLIDE 43

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Commments on Parameterization

  • 1. Side conditions: As with the oneway model, we need only Jf − 1

parameters to differentiate between Jf means so in Rwe usually

▶ set α1 = β1 = 0 (set to zero side condition) or;

set

j j

0,

k k

0 (sum to zero side condition)

  • 2. Model Limitations: The additive mmodel is a Reduced Model

there are J1 J2 groups or treatment combinations a full model fits a population mean separately for each treatment combination this would require J1 J2 parameters

In contrast the additive model has only 1 J1 1 J2 1 J1 J2 1 parameters

slide-44
SLIDE 44

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Commments on Parameterization

  • 1. Side conditions: As with the oneway model, we need only Jf − 1

parameters to differentiate between Jf means so in Rwe usually

▶ set α1 = β1 = 0 (set to zero side condition) or; ▶ set ∑

j αj = 0, ∑ k βk = 0 (sum to zero side condition)

  • 2. Model Limitations: The additive mmodel is a Reduced Model

there are J1 J2 groups or treatment combinations a full model fits a population mean separately for each treatment combination this would require J1 J2 parameters

In contrast the additive model has only 1 J1 1 J2 1 J1 J2 1 parameters

slide-45
SLIDE 45

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Commments on Parameterization

  • 1. Side conditions: As with the oneway model, we need only Jf − 1

parameters to differentiate between Jf means so in Rwe usually

▶ set α1 = β1 = 0 (set to zero side condition) or; ▶ set ∑

j αj = 0, ∑ k βk = 0 (sum to zero side condition)

  • 2. Model Limitations: The additive mmodel is a Reduced Model

there are J1 J2 groups or treatment combinations a full model fits a population mean separately for each treatment combination this would require J1 J2 parameters

In contrast the additive model has only 1 J1 1 J2 1 J1 J2 1 parameters

slide-46
SLIDE 46

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Commments on Parameterization

  • 1. Side conditions: As with the oneway model, we need only Jf − 1

parameters to differentiate between Jf means so in Rwe usually

▶ set α1 = β1 = 0 (set to zero side condition) or; ▶ set ∑

j αj = 0, ∑ k βk = 0 (sum to zero side condition)

  • 2. Model Limitations: The additive mmodel is a Reduced Model

▶ there are J1 × J2 groups or treatment combinations

a full model fits a population mean separately for each treatment combination this would require J1 J2 parameters

In contrast the additive model has only 1 J1 1 J2 1 J1 J2 1 parameters

slide-47
SLIDE 47

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Commments on Parameterization

  • 1. Side conditions: As with the oneway model, we need only Jf − 1

parameters to differentiate between Jf means so in Rwe usually

▶ set α1 = β1 = 0 (set to zero side condition) or; ▶ set ∑

j αj = 0, ∑ k βk = 0 (sum to zero side condition)

  • 2. Model Limitations: The additive mmodel is a Reduced Model

▶ there are J1 × J2 groups or treatment combinations ▶ a full model fits a population mean separately for each treatment

combination this would require J1 J2 parameters

In contrast the additive model has only 1 J1 1 J2 1 J1 J2 1 parameters

slide-48
SLIDE 48

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Commments on Parameterization

  • 1. Side conditions: As with the oneway model, we need only Jf − 1

parameters to differentiate between Jf means so in Rwe usually

▶ set α1 = β1 = 0 (set to zero side condition) or; ▶ set ∑

j αj = 0, ∑ k βk = 0 (sum to zero side condition)

  • 2. Model Limitations: The additive mmodel is a Reduced Model

▶ there are J1 × J2 groups or treatment combinations ▶ a full model fits a population mean separately for each treatment

combination

▶ this would require J1 × J2 parameters

In contrast the additive model has only 1 J1 1 J2 1 J1 J2 1 parameters

slide-49
SLIDE 49

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Commments on Parameterization

  • 1. Side conditions: As with the oneway model, we need only Jf − 1

parameters to differentiate between Jf means so in Rwe usually

▶ set α1 = β1 = 0 (set to zero side condition) or; ▶ set ∑

j αj = 0, ∑ k βk = 0 (sum to zero side condition)

  • 2. Model Limitations: The additive mmodel is a Reduced Model

▶ there are J1 × J2 groups or treatment combinations ▶ a full model fits a population mean separately for each treatment

combination

▶ this would require J1 × J2 parameters

In contrast the additive model has only 1 + (J1 − 1) + (J2 − 1) = J1 + J2 − 1 parameters

slide-50
SLIDE 50

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Parameter Estimation

yijk = ¯ y... + (¯ y.j. − ¯ y...) + (¯ y..k − ¯ y...) + (yijk − ¯ y.j. − ¯ y..k + ¯ y...) These are the OLS or MLE estimates with the sum-to-zero constraints The fitted value in each group: Yijk

j k

Note the fitted values do not change with the model parameterization

slide-51
SLIDE 51

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Parameter Estimation

yijk = ¯ y... + (¯ y.j. − ¯ y...) + (¯ y..k − ¯ y...) + (yijk − ¯ y.j. − ¯ y..k + ¯ y...) These are the OLS or MLE estimates with the sum-to-zero constraints The fitted value in each group: Yijk

j k

Note the fitted values do not change with the model parameterization

slide-52
SLIDE 52

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Parameter Estimation

yijk = ¯ y... + (¯ y.j. − ¯ y...) + (¯ y..k − ¯ y...) + (yijk − ¯ y.j. − ¯ y..k + ¯ y...) These are the OLS or MLE estimates with the sum-to-zero constraints The fitted value in each group: ˆ Yijk = ˆ µ + ˆ αj + ˆ βk Note the fitted values do not change with the model parameterization

slide-53
SLIDE 53

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Sum of Squares

Yijk − ˆ µ = ˆ αj + ˆ βk + ˆ ϵijk ∑

i

j

k(Yijk−ˆ

µ)2 = ∑

i

j

k ˆ

α2

j +∑ i

j

k ˆ

β2

k+∑ i

j

k(Yijk−ˆ

ϵijk)2 SST

  • tal = SSTime + SSIntensity + SSE (Balanced case)
slide-54
SLIDE 54

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Sum of Squares

Yijk − ˆ µ = ˆ αj + ˆ βk + ˆ ϵijk ∑

i

j

k(Yijk−ˆ

µ)2 = ∑

i

j

k ˆ

α2

j +∑ i

j

k ˆ

β2

k+∑ i

j

k(Yijk−ˆ

ϵijk)2 SSTotal = SSTime + SSIntensity + SSE (Balanced case)

slide-55
SLIDE 55

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

ANOVA Main Effects

> mf.lmmain = lm(Flowers ~ Intensity + Time, data=mf) > anova(mf.lmmain) Analysis of Variance Table Response: Flowers Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 11.888 4.63e-05 *** Time 1 886.95 886.95 19.646 0.0003649 *** Residuals 17 767.47 45.15

  • Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

ANOVA has decomposed the variance in the data into the variance

  • f

Additive Intensity effects Additive Time Effects residuals Does this adequately represent what is going on in the data?

slide-56
SLIDE 56

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

ANOVA Main Effects

> mf.lmmain = lm(Flowers ~ Intensity + Time, data=mf) > anova(mf.lmmain) Analysis of Variance Table Response: Flowers Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 11.888 4.63e-05 *** Time 1 886.95 886.95 19.646 0.0003649 *** Residuals 17 767.47 45.15

  • Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

ANOVA has decomposed the variance in the data into the variance

  • f

▶ Additive Intensity effects

Additive Time Effects residuals Does this adequately represent what is going on in the data?

slide-57
SLIDE 57

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

ANOVA Main Effects

> mf.lmmain = lm(Flowers ~ Intensity + Time, data=mf) > anova(mf.lmmain) Analysis of Variance Table Response: Flowers Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 11.888 4.63e-05 *** Time 1 886.95 886.95 19.646 0.0003649 *** Residuals 17 767.47 45.15

  • Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

ANOVA has decomposed the variance in the data into the variance

  • f

▶ Additive Intensity effects ▶ Additive Time Effects

residuals Does this adequately represent what is going on in the data?

slide-58
SLIDE 58

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

ANOVA Main Effects

> mf.lmmain = lm(Flowers ~ Intensity + Time, data=mf) > anova(mf.lmmain) Analysis of Variance Table Response: Flowers Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 11.888 4.63e-05 *** Time 1 886.95 886.95 19.646 0.0003649 *** Residuals 17 767.47 45.15

  • Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

ANOVA has decomposed the variance in the data into the variance

  • f

▶ Additive Intensity effects ▶ Additive Time Effects ▶ residuals

Does this adequately represent what is going on in the data?

slide-59
SLIDE 59

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

ANOVA Main Effects

> mf.lmmain = lm(Flowers ~ Intensity + Time, data=mf) > anova(mf.lmmain) Analysis of Variance Table Response: Flowers Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 11.888 4.63e-05 *** Time 1 886.95 886.95 19.646 0.0003649 *** Residuals 17 767.47 45.15

  • Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

ANOVA has decomposed the variance in the data into the variance

  • f

▶ Additive Intensity effects ▶ Additive Time Effects ▶ residuals

Does this adequately represent what is going on in the data?

slide-60
SLIDE 60

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Interaction?

▶ What do we mean by additive? Assuming the model is correct

we have E Y I 150 Time 1

1 1

E Y I 150 Time 2

1 2

the diffference between Time 1 and Time 2 is

1 2 regardless

  • f Intensity

Full model will allow the effect of Time to vary across intensity levels Reduced or Additive model says differences are constant across Intensity H0 ? How can we test this?

slide-61
SLIDE 61

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Interaction?

▶ What do we mean by additive? Assuming the model is correct

we have E[Y | I = 150, Time = 1] = µ + α1 + β1 E[Y | I = 150, Time = 2] = µ + α1 + β2 the diffference between Time 1 and Time 2 is

1 2 regardless

  • f Intensity

Full model will allow the effect of Time to vary across intensity levels Reduced or Additive model says differences are constant across Intensity H0 ? How can we test this?

slide-62
SLIDE 62

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Interaction?

▶ What do we mean by additive? Assuming the model is correct

we have E[Y | I = 150, Time = 1] = µ + α1 + β1 E[Y | I = 150, Time = 2] = µ + α1 + β2 the diffference between Time 1 and Time 2 is

1 2 regardless

  • f Intensity

Full model will allow the effect of Time to vary across intensity levels Reduced or Additive model says differences are constant across Intensity H0 ? How can we test this?

slide-63
SLIDE 63

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Interaction?

▶ What do we mean by additive? Assuming the model is correct

we have E[Y | I = 150, Time = 1] = µ + α1 + β1 E[Y | I = 150, Time = 2] = µ + α1 + β2

▶ the diffference between Time 1 and Time 2 is β1 − β2 regardless

  • f Intensity

Full model will allow the effect of Time to vary across intensity levels Reduced or Additive model says differences are constant across Intensity H0 ? How can we test this?

slide-64
SLIDE 64

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Interaction?

▶ What do we mean by additive? Assuming the model is correct

we have E[Y | I = 150, Time = 1] = µ + α1 + β1 E[Y | I = 150, Time = 2] = µ + α1 + β2

▶ the diffference between Time 1 and Time 2 is β1 − β2 regardless

  • f Intensity

▶ Full model will allow the effect of Time to vary across intensity

levels Reduced or Additive model says differences are constant across Intensity H0 ? How can we test this?

slide-65
SLIDE 65

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Interaction?

▶ What do we mean by additive? Assuming the model is correct

we have E[Y | I = 150, Time = 1] = µ + α1 + β1 E[Y | I = 150, Time = 2] = µ + α1 + β2

▶ the diffference between Time 1 and Time 2 is β1 − β2 regardless

  • f Intensity

▶ Full model will allow the effect of Time to vary across intensity

levels

▶ Reduced or Additive model says differences are constant across

Intensity H0 ? How can we test this?

slide-66
SLIDE 66

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Interaction?

▶ What do we mean by additive? Assuming the model is correct

we have E[Y | I = 150, Time = 1] = µ + α1 + β1 E[Y | I = 150, Time = 2] = µ + α1 + β2

▶ the diffference between Time 1 and Time 2 is β1 − β2 regardless

  • f Intensity

▶ Full model will allow the effect of Time to vary across intensity

levels

▶ Reduced or Additive model says differences are constant across

Intensity

▶ H0 ?

How can we test this?

slide-67
SLIDE 67

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Interaction

No Interaction the effect of light intensity on the number of flowers is the same for both early and late times. The effect of timing on flower production is the same for all levels of light intensity Interaction the difference in average floral production at late and early times depends on the level of light intensity Address this with linear models

slide-68
SLIDE 68

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Interaction

No Interaction the effect of light intensity on the number of flowers is the same for both early and late times. The effect of timing on flower production is the same for all levels of light intensity Interaction the difference in average floral production at late and early times depends on the level of light intensity Address this with linear models

slide-69
SLIDE 69

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Interaction

No Interaction the effect of light intensity on the number of flowers is the same for both early and late times. The effect of timing on flower production is the same for all levels of light intensity Interaction the difference in average floral production at late and early times depends on the level of light intensity Address this with linear models

slide-70
SLIDE 70

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Two-way Anova Model with Interaction

Model Yijk = µjk + ϵijk Rewrite mean as “MAIN” effects plus “INTERACTIONS”

jk j k jk jk interaction terms = deviations from additivity

The interaction term is a correction for non-additivity of the factor effects This is the full model which fits a separate mean to each of the 12 groups interaction = fitted under full - fitted under additive

jk

y jk y j y k y is variance explained by the

jk large or not?

slide-71
SLIDE 71

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Two-way Anova Model with Interaction

Model Yijk = µjk + ϵijk Rewrite mean as “MAIN” effects plus “INTERACTIONS” µjk = µ + αj + βk + γjk

jk interaction terms = deviations from additivity

The interaction term is a correction for non-additivity of the factor effects This is the full model which fits a separate mean to each of the 12 groups interaction = fitted under full - fitted under additive

jk

y jk y j y k y is variance explained by the

jk large or not?

slide-72
SLIDE 72

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Two-way Anova Model with Interaction

Model Yijk = µjk + ϵijk Rewrite mean as “MAIN” effects plus “INTERACTIONS” µjk = µ + αj + βk + γjk

▶ γjk interaction terms = deviations from additivity

The interaction term is a correction for non-additivity of the factor effects This is the full model which fits a separate mean to each of the 12 groups interaction = fitted under full - fitted under additive

jk

y jk y j y k y is variance explained by the

jk large or not?

slide-73
SLIDE 73

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Two-way Anova Model with Interaction

Model Yijk = µjk + ϵijk Rewrite mean as “MAIN” effects plus “INTERACTIONS” µjk = µ + αj + βk + γjk

▶ γjk interaction terms = deviations from additivity ▶ The interaction term is a correction for non-additivity of the

factor effects This is the full model which fits a separate mean to each of the 12 groups interaction = fitted under full - fitted under additive

jk

y jk y j y k y is variance explained by the

jk large or not?

slide-74
SLIDE 74

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Two-way Anova Model with Interaction

Model Yijk = µjk + ϵijk Rewrite mean as “MAIN” effects plus “INTERACTIONS” µjk = µ + αj + βk + γjk

▶ γjk interaction terms = deviations from additivity ▶ The interaction term is a correction for non-additivity of the

factor effects

▶ This is the full model which fits a separate mean to each of the

12 groups interaction = fitted under full - fitted under additive

jk

y jk y j y k y is variance explained by the

jk large or not?

slide-75
SLIDE 75

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Two-way Anova Model with Interaction

Model Yijk = µjk + ϵijk Rewrite mean as “MAIN” effects plus “INTERACTIONS” µjk = µ + αj + βk + γjk

▶ γjk interaction terms = deviations from additivity ▶ The interaction term is a correction for non-additivity of the

factor effects

▶ This is the full model which fits a separate mean to each of the

12 groups

▶ interaction = fitted under full - fitted under additive

ˆ γjk = ¯ y.jk − (¯ y.j. + ¯ y..k − ¯ y...) is variance explained by the

jk large or not?

slide-76
SLIDE 76

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Two-way Anova Model with Interaction

Model Yijk = µjk + ϵijk Rewrite mean as “MAIN” effects plus “INTERACTIONS” µjk = µ + αj + βk + γjk

▶ γjk interaction terms = deviations from additivity ▶ The interaction term is a correction for non-additivity of the

factor effects

▶ This is the full model which fits a separate mean to each of the

12 groups

▶ interaction = fitted under full - fitted under additive

ˆ γjk = ¯ y.jk − (¯ y.j. + ¯ y..k − ¯ y...)

▶ is variance explained by the ˆ

γjk large or not?

slide-77
SLIDE 77

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Output from lm

> mf.lmint = lm(Flowers ~ Intensity*Time, data=mf) > summary(mf.lmint) Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 69.850 5.228 13.361 1.45e-08 *** Intensity300

  • 15.100

7.393

  • 2.042

0.06372 . Intensity450

  • 14.100

7.393

  • 1.907

0.08072 . Intensity600

  • 27.300

7.393

  • 3.693

0.00308 ** Intensity750

  • 31.750

7.393

  • 4.294

0.00104 ** Intensity900

  • 30.500

7.393

  • 4.125

0.00141 ** Time2 6.850 7.393 0.927 0.37244 Intensity300:Time2 11.950 10.456 1.143 0.27536 Intensity450:Time2 1.450 10.456 0.139 0.89200 Intensity600:Time2 8.150 10.456 0.779 0.45080 Intensity750:Time2 8.000 10.456 0.765 0.45897 Intensity900:Time2 2.300 10.456 0.220 0.82959 Residual standard error: 7.393 on 12 degrees of freedom Multiple R-squared: 0.8488,^^IAdjusted R-squared: 0.7102 F-statistic: 6.124 on 11 and 12 DF, p-value: 0.002028

slide-78
SLIDE 78

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Extra Sum of Squares (Partial) F-Test

Test for interaction:

▶ Null hyposthesis Ho : γ22 = γ23 = . . . γ26 = 0

Alternative hypothesis Ha at least on

jk

Because the hypothesis involves several coefficients, it is more appropriate to use an F test rather than individual t-tests.

  • 1. Fit Complex model (under alternative hypothesis)
  • 2. Fit Simpler model (under null hypothesis)
  • 3. Compare reduction in residual Sum of Squares, “Extra SS” due

to the additional parameters in Ha F Residual SS Residual Degrees of Freedom

2 Ha

  • 4. F has an F distribution with

residual df (numerator) and residual df under Ha (denominator)

slide-79
SLIDE 79

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Extra Sum of Squares (Partial) F-Test

Test for interaction:

▶ Null hyposthesis Ho : γ22 = γ23 = . . . γ26 = 0 ▶ Alternative hypothesis Ha : at least on γjk ̸= 0

Because the hypothesis involves several coefficients, it is more appropriate to use an F test rather than individual t-tests.

  • 1. Fit Complex model (under alternative hypothesis)
  • 2. Fit Simpler model (under null hypothesis)
  • 3. Compare reduction in residual Sum of Squares, “Extra SS” due

to the additional parameters in Ha F Residual SS Residual Degrees of Freedom

2 Ha

  • 4. F has an F distribution with

residual df (numerator) and residual df under Ha (denominator)

slide-80
SLIDE 80

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Extra Sum of Squares (Partial) F-Test

Test for interaction:

▶ Null hyposthesis Ho : γ22 = γ23 = . . . γ26 = 0 ▶ Alternative hypothesis Ha : at least on γjk ̸= 0

Because the hypothesis involves several coefficients, it is more appropriate to use an F test rather than individual t-tests.

  • 1. Fit Complex model (under alternative hypothesis)
  • 2. Fit Simpler model (under null hypothesis)
  • 3. Compare reduction in residual Sum of Squares, “Extra SS” due

to the additional parameters in Ha F Residual SS Residual Degrees of Freedom

2 Ha

  • 4. F has an F distribution with

residual df (numerator) and residual df under Ha (denominator)

slide-81
SLIDE 81

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Extra Sum of Squares (Partial) F-Test

Test for interaction:

▶ Null hyposthesis Ho : γ22 = γ23 = . . . γ26 = 0 ▶ Alternative hypothesis Ha : at least on γjk ̸= 0

Because the hypothesis involves several coefficients, it is more appropriate to use an F test rather than individual t-tests.

  • 1. Fit Complex model (under alternative hypothesis)
  • 2. Fit Simpler model (under null hypothesis)
  • 3. Compare reduction in residual Sum of Squares, “Extra SS” due

to the additional parameters in Ha F Residual SS Residual Degrees of Freedom

2 Ha

  • 4. F has an F distribution with

residual df (numerator) and residual df under Ha (denominator)

slide-82
SLIDE 82

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Extra Sum of Squares (Partial) F-Test

Test for interaction:

▶ Null hyposthesis Ho : γ22 = γ23 = . . . γ26 = 0 ▶ Alternative hypothesis Ha : at least on γjk ̸= 0

Because the hypothesis involves several coefficients, it is more appropriate to use an F test rather than individual t-tests.

  • 1. Fit Complex model (under alternative hypothesis)
  • 2. Fit Simpler model (under null hypothesis)
  • 3. Compare reduction in residual Sum of Squares, “Extra SS” due

to the additional parameters in Ha F Residual SS Residual Degrees of Freedom

2 Ha

  • 4. F has an F distribution with

residual df (numerator) and residual df under Ha (denominator)

slide-83
SLIDE 83

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Extra Sum of Squares (Partial) F-Test

Test for interaction:

▶ Null hyposthesis Ho : γ22 = γ23 = . . . γ26 = 0 ▶ Alternative hypothesis Ha : at least on γjk ̸= 0

Because the hypothesis involves several coefficients, it is more appropriate to use an F test rather than individual t-tests.

  • 1. Fit Complex model (under alternative hypothesis)
  • 2. Fit Simpler model (under null hypothesis)
  • 3. Compare reduction in residual Sum of Squares, “Extra SS” due

to the additional parameters in Ha F Residual SS Residual Degrees of Freedom

2 Ha

  • 4. F has an F distribution with

residual df (numerator) and residual df under Ha (denominator)

slide-84
SLIDE 84

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Extra Sum of Squares (Partial) F-Test

Test for interaction:

▶ Null hyposthesis Ho : γ22 = γ23 = . . . γ26 = 0 ▶ Alternative hypothesis Ha : at least on γjk ̸= 0

Because the hypothesis involves several coefficients, it is more appropriate to use an F test rather than individual t-tests.

  • 1. Fit Complex model (under alternative hypothesis)
  • 2. Fit Simpler model (under null hypothesis)
  • 3. Compare reduction in residual Sum of Squares, “Extra SS” due

to the additional parameters in Ha F = ∆ Residual SS/∆Residual Degrees of Freedom ˆ σ2

Ha

  • 4. F has an F distribution with

residual df (numerator) and residual df under Ha (denominator)

slide-85
SLIDE 85

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Extra Sum of Squares (Partial) F-Test

Test for interaction:

▶ Null hyposthesis Ho : γ22 = γ23 = . . . γ26 = 0 ▶ Alternative hypothesis Ha : at least on γjk ̸= 0

Because the hypothesis involves several coefficients, it is more appropriate to use an F test rather than individual t-tests.

  • 1. Fit Complex model (under alternative hypothesis)
  • 2. Fit Simpler model (under null hypothesis)
  • 3. Compare reduction in residual Sum of Squares, “Extra SS” due

to the additional parameters in Ha F = ∆ Residual SS/∆Residual Degrees of Freedom ˆ σ2

Ha

  • 4. F has an F distribution with ∆ residual df (numerator) and

residual df under Ha (denominator)

slide-86
SLIDE 86

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

R code

> anova(mf.lmmain) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 11.888 4.63e-05 *** Time 1 886.95 886.95 19.646 0.0003649 *** Residuals 17 767.47 45.15 > anova(mf.lmint) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 9.8189 0.0006388 *** Time 1 886.95 886.95 16.2266 0.0016745 ** Intensity:Time 5 111.55 22.31 0.4081 0.8341569 Residuals 12 655.92 54.66

Notice 767 47 111 55 655 92 that is SSE SS SSEFull 17 5 12 Degrees of freedom df df dfFull degrees of freedom treeatment and SS are unchanged Which is a better estimate of the within group variance?

slide-87
SLIDE 87

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

R code

> anova(mf.lmmain) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 11.888 4.63e-05 *** Time 1 886.95 886.95 19.646 0.0003649 *** Residuals 17 767.47 45.15 > anova(mf.lmint) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 9.8189 0.0006388 *** Time 1 886.95 886.95 16.2266 0.0016745 ** Intensity:Time 5 111.55 22.31 0.4081 0.8341569 Residuals 12 655.92 54.66

▶ Notice 767.47 = 111.55 + 655.92 that is

SSEreduced = SSγ + SSEFull 17 5 12 Degrees of freedom df df dfFull degrees of freedom treeatment and SS are unchanged Which is a better estimate of the within group variance?

slide-88
SLIDE 88

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

R code

> anova(mf.lmmain) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 11.888 4.63e-05 *** Time 1 886.95 886.95 19.646 0.0003649 *** Residuals 17 767.47 45.15 > anova(mf.lmint) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 9.8189 0.0006388 *** Time 1 886.95 886.95 16.2266 0.0016745 ** Intensity:Time 5 111.55 22.31 0.4081 0.8341569 Residuals 12 655.92 54.66

▶ Notice 767.47 = 111.55 + 655.92 that is

SSEreduced = SSγ + SSEFull

▶ 17 = 5 + 12 Degrees of freedom dfreduced = dfγ + dfFull

degrees of freedom treeatment and SS are unchanged Which is a better estimate of the within group variance?

slide-89
SLIDE 89

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

R code

> anova(mf.lmmain) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 11.888 4.63e-05 *** Time 1 886.95 886.95 19.646 0.0003649 *** Residuals 17 767.47 45.15 > anova(mf.lmint) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 9.8189 0.0006388 *** Time 1 886.95 886.95 16.2266 0.0016745 ** Intensity:Time 5 111.55 22.31 0.4081 0.8341569 Residuals 12 655.92 54.66

▶ Notice 767.47 = 111.55 + 655.92 that is

SSEreduced = SSγ + SSEFull

▶ 17 = 5 + 12 Degrees of freedom dfreduced = dfγ + dfFull ▶ degrees of freedom treeatment and SS are unchanged

Which is a better estimate of the within group variance?

slide-90
SLIDE 90

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

R code

> anova(mf.lmmain) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 11.888 4.63e-05 *** Time 1 886.95 886.95 19.646 0.0003649 *** Residuals 17 767.47 45.15 > anova(mf.lmint) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 9.8189 0.0006388 *** Time 1 886.95 886.95 16.2266 0.0016745 ** Intensity:Time 5 111.55 22.31 0.4081 0.8341569 Residuals 12 655.92 54.66

▶ Notice 767.47 = 111.55 + 655.92 that is

SSEreduced = SSγ + SSEFull

▶ 17 = 5 + 12 Degrees of freedom dfreduced = dfγ + dfFull ▶ degrees of freedom treeatment and SS are unchanged ▶ Which is a better estimate of the within group variance?

slide-91
SLIDE 91

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

R code

> anova(mf.lmmain) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 11.888 4.63e-05 *** Time 1 886.95 886.95 19.646 0.0003649 *** Residuals 17 767.47 45.15 > anova(mf.lmint) Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 9.8189 0.0006388 *** Time 1 886.95 886.95 16.2266 0.0016745 ** Intensity:Time 5 111.55 22.31 0.4081 0.8341569 Residuals 12 655.92 54.66

▶ Notice 767.47 = 111.55 + 655.92 that is

SSEreduced = SSγ + SSEFull

▶ 17 = 5 + 12 Degrees of freedom dfreduced = dfγ + dfFull ▶ degrees of freedom treeatment and SS are unchanged ▶ Which is a better estimate of the within group variance?

slide-92
SLIDE 92

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

R Code

anova(mf.lmmain, mf.lmint) Analysis of Variance Table Model 1: Flowers ~ Intensity + Time Model 2: Flowers ~ Intensity * Time Res.Df RSS Df Sum of Sq F Pr(>F) 1 17 767.47 2 12 655.92 5 111.55 0.4081 0.8342 >

▶ If H0 is not true

E MSEFull

2

E MSE

2

r 2

2

if H0 is true then MSE Full and MSE are both independent estimates of

  • 2. We should combine them to improve our

estimate of

2

Conclusion?

slide-93
SLIDE 93

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

R Code

anova(mf.lmmain, mf.lmint) Analysis of Variance Table Model 1: Flowers ~ Intensity + Time Model 2: Flowers ~ Intensity * Time Res.Df RSS Df Sum of Sq F Pr(>F) 1 17 767.47 2 12 655.92 5 111.55 0.4081 0.8342 >

▶ If H0 is not true

▶ E[MSEFull = σ2

E MSE

2

r 2

2

if H0 is true then MSE Full and MSE are both independent estimates of

  • 2. We should combine them to improve our

estimate of

2

Conclusion?

slide-94
SLIDE 94

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

R Code

anova(mf.lmmain, mf.lmint) Analysis of Variance Table Model 1: Flowers ~ Intensity + Time Model 2: Flowers ~ Intensity * Time Res.Df RSS Df Sum of Sq F Pr(>F) 1 17 767.47 2 12 655.92 5 111.55 0.4081 0.8342 >

▶ If H0 is not true

▶ E[MSEFull = σ2 ▶ E[MSEγ = σ2 + rτ 2

γ > σ2

if H0 is true then MSE Full and MSE are both independent estimates of

  • 2. We should combine them to improve our

estimate of

2

Conclusion?

slide-95
SLIDE 95

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

R Code

anova(mf.lmmain, mf.lmint) Analysis of Variance Table Model 1: Flowers ~ Intensity + Time Model 2: Flowers ~ Intensity * Time Res.Df RSS Df Sum of Sq F Pr(>F) 1 17 767.47 2 12 655.92 5 111.55 0.4081 0.8342 >

▶ If H0 is not true

▶ E[MSEFull = σ2 ▶ E[MSEγ = σ2 + rτ 2

γ > σ2

▶ if H0 is true then MSE Full and MSEγ are both independent

estimates of σ2. We should combine them to improve our estimate of σ2 Conclusion?

slide-96
SLIDE 96

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Factors versus Quantatative Variables

Plots suggest that the response decreases linearly with light intensity Restriction on the means Hypothesis that

jk is linear in INTENSITY levels can be

expressed as a one degree of freedom contrast (see chapter 8) Extra Sum of Squares F test: compare the model with Intensity as a factor to the model with Intensity as a numeric variable

slide-97
SLIDE 97

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Factors versus Quantatative Variables

Plots suggest that the response decreases linearly with light intensity

▶ Restriction on the means

Hypothesis that

jk is linear in INTENSITY levels can be

expressed as a one degree of freedom contrast (see chapter 8) Extra Sum of Squares F test: compare the model with Intensity as a factor to the model with Intensity as a numeric variable

slide-98
SLIDE 98

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Factors versus Quantatative Variables

Plots suggest that the response decreases linearly with light intensity

▶ Restriction on the means ▶ Hypothesis that µjk is linear in INTENSITY levels can be

expressed as a one degree of freedom contrast (see chapter 8) Extra Sum of Squares F test: compare the model with Intensity as a factor to the model with Intensity as a numeric variable

slide-99
SLIDE 99

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Factors versus Quantatative Variables

Plots suggest that the response decreases linearly with light intensity

▶ Restriction on the means ▶ Hypothesis that µjk is linear in INTENSITY levels can be

expressed as a one degree of freedom contrast (see chapter 8)

▶ Extra Sum of Squares F test: compare the model with Intensity

as a factor to the model with Intensity as a numeric variable

slide-100
SLIDE 100

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Test for Linearity

> mf.lm = lm(Flowers ~ Intensity + factor(Time), data=case0901) > mf.lmmain = lm(Flowers ~ factor(Intensity) + factor(Time), data=case0901) > anova(mf.lm, mf.lmmain) Analysis of Variance Table Model 1: Flowers ~ Intensity + factor(Time) Model 2: Flowers ~ factor(Intensity) + factor(Time) Res.Df RSS Df Sum of Sq F Pr(>F) 1 21 871.24 2 17 767.47 4 103.76 0.5746 0.6848

Conclusion?

slide-101
SLIDE 101

STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Final Model

> summary(mf.lm) lm(formula = Flowers ~ Intensity + factor(Time), data = case0901) Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 71.305833 3.273772 21.781 6.77e-16 *** Intensity

  • 0.040471

0.005132

  • 7.886 1.04e-07 ***

factor(Time)2 12.158333 2.629557 4.624 0.000146 *** Residual standard error: 6.441 on 21 degrees of freedom Multiple R-squared: 0.7992,^^IAdjusted R-squared: 0.78 F-statistic: 41.78 on 2 and 21 DF, p-value: 4.786e-08

What is optimal combination?