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) Experimental Design Each of the 12 combinations assigned to a group of 10 plants, replicated twice TIME 150 300 450 600 750 900 Layout Late y L , 150 y L , 300 y L , 450 y L , 600 y L , 750 y L , 900 Early y E , 150 y E , 300 y E , 450 y E , 600 y E , 750 y E , 900 This type of design is called a factorial design. STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Factor Categories of treatments Levels of a factor The different treatments in a category levels(mf$Time) Experimental Design Each of the 12 combinations assigned to a group of 10 plants, replicated twice TIME 150 300 450 600 750 900 Layout Late y L , 150 y L , 300 y L , 450 y L , 600 y L , 750 y L , 900 Early y E , 150 y E , 300 y E , 450 y E , 600 y E , 750 y 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Levels of a factor The different treatments in a category levels(mf$Time) Experimental Design Each of the 12 combinations assigned to a group of 10 plants, replicated twice TIME 150 300 450 600 750 900 Layout Late y L , 150 y L , 300 y L , 450 y L , 600 y L , 750 y L , 900 Early y E , 150 y E , 300 y E , 450 y E , 600 y E , 750 y 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
levels(mf$Time) Experimental Design Each of the 12 combinations assigned to a group of 10 plants, replicated twice TIME 150 300 450 600 750 900 Layout Late y L , 150 y L , 300 y L , 450 y L , 600 y L , 750 y L , 900 Early y E , 150 y E , 300 y E , 450 y E , 600 y E , 750 y 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
levels(mf$Time) Experimental Design Each of the 12 combinations assigned to a group of 10 plants, replicated twice TIME 150 300 450 600 750 900 Layout Late y L , 150 y L , 300 y L , 450 y L , 600 y L , 750 y L , 900 Early y E , 150 y E , 300 y E , 450 y E , 600 y E , 750 y 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Marginal Plots 70 70 60 60 Flowers Flowers 50 50 40 40 30 30 150 300 450 600 750 900 1 2 Intensity Time STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Conditional Plots coplot(Flowers ∼ Intensity | Time, data=mf) Given : factor(Time) 2 1 150 300 450 600 750 900 ● ● ● ● 70 ● ● ● ● ● 60 ● Flowers ● ● ● ● ● 50 ● ● ● ● ● ● 40 ● ● ● 30 150 300 450 600 750 900 Intensity STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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? Goals ▶ What is the effect of differing light conditions? STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Does the effect of light intensity depend on the timing? What is the best combination? Goals ▶ What is the effect of differing light conditions? ▶ What is the effect of timing on flower production? (one CRD) STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
What is the best combination? 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? 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? STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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. 91.91 886.95 > anova(lm(Flowers ~ Time, data=mf)) Df Sum Sq Mean Sq F value Pr(>F) Time 1 887 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 Possible Analyses Lets try to analyize the data with our existing tools: STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
just looking at Intensity, the experiment is a one-factor ANOVA with 6 treatment levels and 4 reps per treatment. 91.91 Residuals 22 > anova(lm(Flowers ~ Time, data=mf)) Df Sum Sq Mean Sq F value Pr(>F) Time 1 887 886.95 5.6543 0.02653 * 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 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. STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
91.91 3451 > anova(lm(Flowers ~ Time, data=mf)) Df Sum Sq Mean Sq F value Pr(>F) Time 1 887 886.95 Residuals 22 5.6543 0.02653 * 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 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. STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
91.91 3451 > anova(lm(Flowers ~ Time, data=mf)) Df Sum Sq Mean Sq F value Pr(>F) Time 1 887 886.95 Residuals 22 5.6543 0.02653 * 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 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. STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> --- 54.66 655.9 12 Residuals 6.1238 0.002028 ** 334.73 Intensity:Time 11 3682.0 Pr(>F) Df Sum Sq Mean Sq F value Response: Flowers Analysis of Variance Table > anova(lm(Flowers ~ Intensity:Time, data=mf)) And Another Oneway ANOVA A one-factor ANOVA with 2 × 6 = 12 treatments: STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> --- 54.66 655.9 12 Residuals 6.1238 0.002028 ** 334.73 Intensity:Time 11 3682.0 Pr(>F) Df Sum Sq Mean Sq F value Response: Flowers Analysis of Variance Table > anova(lm(Flowers ~ Intensity:Time, data=mf)) And Another Oneway ANOVA A one-factor ANOVA with 2 × 6 = 12 treatments: STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 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? STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 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? STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 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”? STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 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. STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 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 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 STA 643 12 treatment combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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) Two Way Additive Effects Model Model Y ijk = µ jk + ϵ ijk Rewrite mean as “MAIN” effects STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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) Two Way Additive Effects Model Model Y ijk = µ jk + ϵ ijk Rewrite mean as “MAIN” effects µ jk = µ + α j + β k + γ jk STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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) Two Way Additive Effects Model Model Y ijk = µ 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
k k 1 2 6 additive effects of Intensity i 1 2 (replicate) Two Way Additive Effects Model Model Y ijk = µ 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
i 1 2 (replicate) Two Way Additive Effects Model Model Y ijk = µ 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Two Way Additive Effects Model Model Y ijk = µ 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) STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
set 0 (set to zero side condition) or; 1 1 set 0, 0 (sum to zero side condition) j k j k 2. Model Limitations: The additive mmodel is a Reduced Model there are J 1 J 2 groups or treatment combinations a full model fits a population mean separately for each treatment combination this would require J 1 J 2 parameters In contrast the additive model has only 1 1 1 1 parameters J 1 J 2 J 1 J 2 Commments on Parameterization 1. Side conditions: As with the oneway model, we need only J f − 1 parameters to differentiate between J f means so in Rwe usually STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
set 0, 0 (sum to zero side condition) j k j k 2. Model Limitations: The additive mmodel is a Reduced Model there are J 1 J 2 groups or treatment combinations a full model fits a population mean separately for each treatment combination this would require J 1 J 2 parameters In contrast the additive model has only 1 1 1 1 parameters J 1 J 2 J 1 J 2 Commments on Parameterization 1. Side conditions: As with the oneway model, we need only J f − 1 parameters to differentiate between J f means so in Rwe usually ▶ set α 1 = β 1 = 0 (set to zero side condition) or; STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2. Model Limitations: The additive mmodel is a Reduced Model there are J 1 J 2 groups or treatment combinations a full model fits a population mean separately for each treatment combination this would require J 1 J 2 parameters In contrast the additive model has only 1 1 1 1 parameters J 1 J 2 J 1 J 2 Commments on Parameterization 1. Side conditions: As with the oneway model, we need only J f − 1 parameters to differentiate between J f 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) STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
there are J 1 J 2 groups or treatment combinations a full model fits a population mean separately for each treatment combination this would require J 1 J 2 parameters In contrast the additive model has only 1 1 1 1 parameters J 1 J 2 J 1 J 2 Commments on Parameterization 1. Side conditions: As with the oneway model, we need only J f − 1 parameters to differentiate between J f 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
a full model fits a population mean separately for each treatment combination this would require J 1 J 2 parameters In contrast the additive model has only 1 1 1 1 parameters J 1 J 2 J 1 J 2 Commments on Parameterization 1. Side conditions: As with the oneway model, we need only J f − 1 parameters to differentiate between J f 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 J 1 × J 2 groups or treatment combinations STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
this would require J 1 J 2 parameters In contrast the additive model has only 1 1 1 1 parameters J 1 J 2 J 1 J 2 Commments on Parameterization 1. Side conditions: As with the oneway model, we need only J f − 1 parameters to differentiate between J f 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 J 1 × J 2 groups or treatment combinations ▶ a full model fits a population mean separately for each treatment combination STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
In contrast the additive model has only 1 1 1 1 parameters J 1 J 2 J 1 J 2 Commments on Parameterization 1. Side conditions: As with the oneway model, we need only J f − 1 parameters to differentiate between J f 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 J 1 × J 2 groups or treatment combinations ▶ a full model fits a population mean separately for each treatment combination ▶ this would require J 1 × J 2 parameters STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Commments on Parameterization 1. Side conditions: As with the oneway model, we need only J f − 1 parameters to differentiate between J f 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 J 1 × J 2 groups or treatment combinations ▶ a full model fits a population mean separately for each treatment combination ▶ this would require J 1 × J 2 parameters In contrast the additive model has only 1 + ( J 1 − 1 ) + ( J 2 − 1 ) = J 1 + J 2 − 1 parameters STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
These are the OLS or MLE estimates with the sum-to-zero constraints The fitted value in each group: Y ijk j k Note the fitted values do not change with the model parameterization Parameter Estimation y ... + (¯ y . j . − ¯ y ... ) + (¯ y .. k − ¯ y ... ) + ( y ijk − ¯ y . j . − ¯ y .. k + ¯ y ... ) y ijk = ¯ STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The fitted value in each group: Y ijk j k Note the fitted values do not change with the model parameterization Parameter Estimation y ... + (¯ y . j . − ¯ y ... ) + (¯ y .. k − ¯ y ... ) + ( y ijk − ¯ y . j . − ¯ y .. k + ¯ y ... ) y ijk = ¯ These are the OLS or MLE estimates with the sum-to-zero constraints STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Parameter Estimation y ... + (¯ y . j . − ¯ y ... ) + (¯ y .. k − ¯ y ... ) + ( y ijk − ¯ y . j . − ¯ y .. k + ¯ y ... ) y ijk = ¯ These are the OLS or MLE estimates with the sum-to-zero constraints The fitted value in each group: ˆ α j + ˆ Y ijk = ˆ µ + ˆ β k Note the fitted values do not change with the model parameterization STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SST otal = SSTime + SSIntensity + SSE (Balanced case) Sum of Squares α j + ˆ Y ijk − ˆ µ = ˆ β k + ˆ ϵ ijk µ ) 2 = ∑ α 2 k ˆ β 2 ϵ ijk ) 2 k ( Y ijk − ˆ k ( Y ijk − ˆ ∑ ∑ ∑ ∑ ∑ k ˆ j + ∑ ∑ ∑ k + ∑ ∑ ∑ i j i j i j i j STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sum of Squares α j + ˆ Y ijk − ˆ µ = ˆ β k + ˆ ϵ ijk µ ) 2 = ∑ α 2 k ˆ β 2 ϵ ijk ) 2 k ( Y ijk − ˆ k ( Y ijk − ˆ ∑ ∑ ∑ ∑ ∑ k ˆ j + ∑ ∑ ∑ k + ∑ ∑ ∑ i j i j i j i j SSTotal = SSTime + SSIntensity + SSE (Balanced case) STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ANOVA has decomposed the variance in the data into the variance of Additive Intensity effects Additive Time Effects residuals Does this adequately represent what is going on in the data? 11.888 > anova(mf.lmmain) Analysis of Variance Table Response: Flowers Df Sum Sq Mean Sq F value Pr(>F) Intensity 5 2683.51 536.70 886.95 4.63e-05 *** Time 1 886.95 19.646 0.0003649 *** Residuals 17 767.47 45.15 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > mf.lmmain = lm(Flowers ~ Intensity + Time, data=mf) ANOVA Main Effects STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Additive Time Effects residuals Does this adequately represent what is going on in the data? Time > 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 *** 886.95 1 886.95 19.646 0.0003649 *** Residuals 17 767.47 45.15 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > mf.lmmain = lm(Flowers ~ Intensity + Time, data=mf) ANOVA Main Effects ANOVA has decomposed the variance in the data into the variance of ▶ Additive Intensity effects STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
residuals Does this adequately represent what is going on in the data? Time > 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 *** 886.95 1 886.95 19.646 0.0003649 *** Residuals 17 767.47 45.15 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > mf.lmmain = lm(Flowers ~ Intensity + Time, data=mf) ANOVA Main Effects ANOVA has decomposed the variance in the data into the variance of ▶ Additive Intensity effects ▶ Additive Time Effects STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Does this adequately represent what is going on in the data? 1 > 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 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 > mf.lmmain = lm(Flowers ~ Intensity + Time, data=mf) ANOVA Main Effects ANOVA has decomposed the variance in the data into the variance of ▶ Additive Intensity effects ▶ Additive Time Effects ▶ residuals STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> mf.lmmain = lm(Flowers ~ Intensity + Time, data=mf) 1 > 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 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 Main Effects ANOVA has decomposed the variance in the data into the variance of ▶ Additive Intensity effects ▶ Additive Time Effects ▶ residuals Does this adequately represent what is going on in the data? STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 2 regardless 1 of 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? Interaction? ▶ What do we mean by additive? Assuming the model is correct we have STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
the diffference between Time 1 and Time 2 is 2 regardless 1 of 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? 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
the diffference between Time 1 and Time 2 is 2 regardless 1 of 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? 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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? 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 of Intensity STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Reduced or Additive model says differences are constant across Intensity H0 ? How can we test this? 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 of Intensity ▶ Full model will allow the effect of Time to vary across intensity levels STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
H0 ? How can we test this? 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 of Intensity ▶ Full model will allow the effect of Time to vary across intensity levels ▶ Reduced or Additive model says differences are constant across Intensity 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 of 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? STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Interaction the difference in average floral production at late and early times depends on the level of light intensity Address this with linear models 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Address this with linear models 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 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 y jk y j y k y jk is variance explained by the jk large or not? Two-way Anova Model with Interaction Model Y ijk = µ jk + ϵ ijk STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 y jk y j y k y jk is variance explained by the jk large or not? Two-way Anova Model with Interaction Model Y ijk = µ jk + ϵ ijk Rewrite mean as “MAIN” effects plus “INTERACTIONS” µ jk = µ + α j + β k + γ jk STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 y jk y j y k y jk is variance explained by the jk large or not? Two-way Anova Model with Interaction Model Y ijk = µ jk + ϵ ijk Rewrite mean as “MAIN” effects plus “INTERACTIONS” µ jk = µ + α j + β k + γ jk ▶ γ jk interaction terms = deviations from additivity STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
This is the full model which fits a separate mean to each of the 12 groups interaction = fitted under full - fitted under additive y jk y j y k y jk is variance explained by the jk large or not? Two-way Anova Model with Interaction Model Y ijk = µ 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
interaction = fitted under full - fitted under additive y jk y j y k y jk is variance explained by the jk large or not? Two-way Anova Model with Interaction Model Y ijk = µ 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
is variance explained by the jk large or not? Two-way Anova Model with Interaction Model Y ijk = µ 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 y . jk − (¯ y . j . + ¯ y .. k − ¯ y ... ) γ jk = ¯ ˆ STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Two-way Anova Model with Interaction Model Y ijk = µ 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 y . jk − (¯ y . j . + ¯ y .. k − ¯ y ... ) γ jk = ¯ ˆ ▶ is variance explained by the ˆ γ jk large or not? STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
p-value: 0.002028 Intensity900 11.950 Intensity300:Time2 0.37244 0.927 7.393 6.850 Time2 0.00141 ** -4.125 7.393 -30.500 0.00104 ** 1.143 -4.294 7.393 -31.750 Intensity750 0.00308 ** -3.693 7.393 -27.300 Intensity600 0.08072 . -1.907 10.456 0.27536 -14.100 0.765 F-statistic: 6.124 on 11 and 12 DF, 0.7102 0.8488,^^IAdjusted R-squared: Multiple R-squared: Residual standard error: 7.393 on 12 degrees of freedom 0.82959 0.220 10.456 2.300 Intensity900:Time2 0.45897 10.456 Intensity450:Time2 8.000 Intensity750:Time2 0.45080 0.779 10.456 8.150 Intensity600:Time2 0.89200 0.139 10.456 1.450 7.393 Intensity450 0.06372 . > mf.lmint = lm(Flowers ~ Intensity*Time, data=mf) -2.042 7.393 -15.100 Intensity300 13.361 1.45e-08 *** 5.228 69.850 (Intercept) Estimate Std. Error t value Pr(>|t|) Coefficients: > summary(mf.lmint) Output from lm STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Alternative hypothesis H a at least on 0 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 H a Residual SS Residual Degrees of Freedom F 2 H a 4. F has an F distribution with residual df (numerator) and residual df under H a (denominator) Extra Sum of Squares (Partial) F-Test Test for interaction: ▶ Null hyposthesis H o : γ 22 = γ 23 = . . . γ 26 = 0 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 H a Residual SS Residual Degrees of Freedom F 2 H a 4. F has an F distribution with residual df (numerator) and residual df under H a (denominator) Extra Sum of Squares (Partial) F-Test Test for interaction: ▶ Null hyposthesis H o : γ 22 = γ 23 = . . . γ 26 = 0 ▶ Alternative hypothesis H a : at least on γ jk ̸ = 0 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 H a Residual SS Residual Degrees of Freedom F 2 H a 4. F has an F distribution with residual df (numerator) and residual df under H a (denominator) Extra Sum of Squares (Partial) F-Test Test for interaction: ▶ Null hyposthesis H o : γ 22 = γ 23 = . . . γ 26 = 0 ▶ Alternative hypothesis H a : 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. STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2. Fit Simpler model (under null hypothesis) 3. Compare reduction in residual Sum of Squares, “Extra SS” due to the additional parameters in H a Residual SS Residual Degrees of Freedom F 2 H a 4. F has an F distribution with residual df (numerator) and residual df under H a (denominator) Extra Sum of Squares (Partial) F-Test Test for interaction: ▶ Null hyposthesis H o : γ 22 = γ 23 = . . . γ 26 = 0 ▶ Alternative hypothesis H a : 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) STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3. Compare reduction in residual Sum of Squares, “Extra SS” due to the additional parameters in H a Residual SS Residual Degrees of Freedom F 2 H a 4. F has an F distribution with residual df (numerator) and residual df under H a (denominator) Extra Sum of Squares (Partial) F-Test Test for interaction: ▶ Null hyposthesis H o : γ 22 = γ 23 = . . . γ 26 = 0 ▶ Alternative hypothesis H a : 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) STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Residual SS Residual Degrees of Freedom F 2 H a 4. F has an F distribution with residual df (numerator) and residual df under H a (denominator) Extra Sum of Squares (Partial) F-Test Test for interaction: ▶ Null hyposthesis H o : γ 22 = γ 23 = . . . γ 26 = 0 ▶ Alternative hypothesis H a : 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 H a STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4. F has an F distribution with residual df (numerator) and residual df under H a (denominator) Extra Sum of Squares (Partial) F-Test Test for interaction: ▶ Null hyposthesis H o : γ 22 = γ 23 = . . . γ 26 = 0 ▶ Alternative hypothesis H a : 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 H a F = ∆ Residual SS / ∆ Residual Degrees of Freedom σ 2 ˆ H a STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Extra Sum of Squares (Partial) F-Test Test for interaction: ▶ Null hyposthesis H o : γ 22 = γ 23 = . . . γ 26 = 0 ▶ Alternative hypothesis H a : 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 H a F = ∆ Residual SS / ∆ Residual Degrees of Freedom σ 2 ˆ H a 4. F has an F distribution with ∆ residual df (numerator) and residual df under H a (denominator) STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Notice 767 47 111 55 655 92 that is SSE SS SSE Full 17 5 12 Degrees of freedom df df df Full degrees of freedom treeatment and SS are unchanged Which is a better estimate of the within group variance? Residuals 17 Sum Sq Mean Sq F value Df > anova(mf.lmint) 45.15 767.47 11.888 19.646 0.0003649 *** 886.95 886.95 1 Time 4.63e-05 *** Intensity Pr(>F) 886.95 16.2266 0.0016745 ** 5 2683.51 111.55 54.66 655.92 12 Residuals 0.4081 0.8341569 22.31 5 536.70 Intensity:Time 5 2683.51 886.95 1 Time 9.8189 0.0006388 *** 536.70 Intensity Sum Sq Mean Sq F value Df > anova(mf.lmmain) Pr(>F) R code STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17 5 12 Degrees of freedom df df df Full degrees of freedom treeatment and SS are unchanged Which is a better estimate of the within group variance? 886.95 Df > anova(mf.lmint) 45.15 767.47 Residuals 17 19.646 0.0003649 *** 4.63e-05 *** 886.95 1 Time Pr(>F) 11.888 536.70 5 2683.51 Sum Sq Mean Sq F value 9.8189 0.0006388 *** Intensity 111.55 54.66 655.92 12 Residuals 0.4081 0.8341569 22.31 5 5 2683.51 Intensity:Time 886.95 16.2266 0.0016745 ** 886.95 1 Time Pr(>F) 536.70 Intensity Sum Sq Mean Sq F value Df > anova(mf.lmmain) R code ▶ Notice 767 . 47 = 111 . 55 + 655 . 92 that is SSE reduced = SS γ + SSE Full STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
degrees of freedom treeatment and SS are unchanged Which is a better estimate of the within group variance? 886.95 > anova(mf.lmint) 45.15 767.47 Residuals 17 19.646 0.0003649 *** 886.95 Time 1 Sum Sq Mean Sq F value 4.63e-05 *** 11.888 536.70 5 2683.51 Intensity Pr(>F) Df Intensity Pr(>F) 5 54.66 655.92 12 Residuals 0.4081 0.8341569 22.31 111.55 Intensity:Time Df 886.95 16.2266 0.0016745 ** 886.95 1 Time 9.8189 0.0006388 *** 536.70 5 2683.51 Sum Sq Mean Sq F value > anova(mf.lmmain) R code ▶ Notice 767 . 47 = 111 . 55 + 655 . 92 that is SSE reduced = SS γ + SSE Full ▶ 17 = 5 + 12 Degrees of freedom df reduced = df γ + df Full STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Which is a better estimate of the within group variance? 886.95 > anova(mf.lmint) 45.15 767.47 Residuals 17 19.646 0.0003649 *** 886.95 1 Sum Sq Mean Sq F value Time 4.63e-05 *** 11.888 536.70 5 2683.51 Intensity Pr(>F) Df Pr(>F) Df 5 54.66 655.92 12 Residuals 0.4081 0.8341569 22.31 111.55 Intensity:Time Intensity 886.95 16.2266 0.0016745 ** 886.95 1 Time 9.8189 0.0006388 *** 536.70 5 2683.51 Sum Sq Mean Sq F value > anova(mf.lmmain) R code ▶ Notice 767 . 47 = 111 . 55 + 655 . 92 that is SSE reduced = SS γ + SSE Full ▶ 17 = 5 + 12 Degrees of freedom df reduced = df γ + df Full ▶ degrees of freedom treeatment and SS are unchanged STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> anova(mf.lmmain) 886.95 Sum Sq Mean Sq F value Df > anova(mf.lmint) 45.15 767.47 Residuals 17 19.646 0.0003649 *** 886.95 Intensity 1 Time 4.63e-05 *** 11.888 536.70 5 2683.51 Intensity Pr(>F) Pr(>F) 5 2683.51 Df 111.55 54.66 655.92 12 Residuals 536.70 22.31 0.4081 0.8341569 5 Intensity:Time 886.95 16.2266 0.0016745 ** 886.95 1 Time 9.8189 0.0006388 *** Sum Sq Mean Sq F value R code ▶ Notice 767 . 47 = 111 . 55 + 655 . 92 that is SSE reduced = SS γ + SSE Full ▶ 17 = 5 + 12 Degrees of freedom df reduced = df γ + df Full ▶ degrees of freedom treeatment and SS are unchanged ▶ Which is a better estimate of the within group variance? STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> anova(mf.lmmain) 886.95 Sum Sq Mean Sq F value Df > anova(mf.lmint) 45.15 767.47 Residuals 17 19.646 0.0003649 *** 886.95 Intensity 1 Time 4.63e-05 *** 11.888 536.70 5 2683.51 Intensity Pr(>F) Pr(>F) 5 2683.51 Df 111.55 54.66 655.92 12 Residuals 536.70 22.31 0.4081 0.8341569 5 Intensity:Time 886.95 16.2266 0.0016745 ** 886.95 1 Time 9.8189 0.0006388 *** Sum Sq Mean Sq F value R code ▶ Notice 767 . 47 = 111 . 55 + 655 . 92 that is SSE reduced = SS γ + SSE Full ▶ 17 = 5 + 12 Degrees of freedom df reduced = df γ + df Full ▶ degrees of freedom treeatment and SS are unchanged ▶ Which is a better estimate of the within group variance? STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 E MSE Full 2 r 2 2 E MSE if H 0 is true then MSE Full and MSE are both independent 2 . We should combine them to improve our estimates of 2 estimate of Conclusion? 1 Analysis of Variance Table Model 1: Flowers ~ Intensity + Time Model 2: Flowers ~ Intensity * Time Res.Df RSS Df Sum of Sq F Pr(>F) > 17 767.47 2 12 655.92 5 111.55 0.4081 0.8342 anova(mf.lmmain, mf.lmint) R Code ▶ If H 0 is not true STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 r 2 2 E MSE if H 0 is true then MSE Full and MSE are both independent 2 . We should combine them to improve our estimates of 2 estimate of Conclusion? 1 Analysis of Variance Table Model 1: Flowers ~ Intensity + Time Model 2: Flowers ~ Intensity * Time Res.Df RSS Df Sum of Sq F Pr(>F) > 17 767.47 2 12 655.92 5 111.55 0.4081 0.8342 anova(mf.lmmain, mf.lmint) R Code ▶ If H 0 is not true ▶ E [ MSE Full = σ 2 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
if H 0 is true then MSE Full and MSE are both independent 2 . We should combine them to improve our estimates of 2 estimate of Conclusion? 17 767.47 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 111.55 0.4081 0.8342 2 12 655.92 5 > anova(mf.lmmain, mf.lmint) R Code ▶ If H 0 is not true ▶ E [ MSE Full = σ 2 ▶ E [ MSE γ = σ 2 + r τ 2 γ > σ 2 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
anova(mf.lmmain, mf.lmint) 12 655.92 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 5 111.55 0.4081 0.8342 > R Code ▶ If H 0 is not true ▶ E [ MSE Full = σ 2 ▶ E [ MSE γ = σ 2 + r τ 2 γ > σ 2 ▶ if H 0 is true then MSE Full and MSE γ are both independent estimates of σ 2 . We should combine them to improve our estimate of σ 2 Conclusion? STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 Factors versus Quantatative Variables Plots suggest that the response decreases linearly with light intensity STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 Factors versus Quantatative Variables Plots suggest that the response decreases linearly with light intensity ▶ Restriction on the means STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Extra Sum of Squares F test: compare the model with Intensity as a factor to the model with Intensity as a numeric variable 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) 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 STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> mf.lm = lm(Flowers ~ Intensity + factor(Time), data=case0901) RSS Df Sum of Sq > 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 F Pr(>F) 1 21 871.24 2 17 767.47 4 103.76 0.5746 0.6848 Test for Linearity Conclusion? STA 643 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Recommend
More recommend