Skip to main content
made the title more precise + syntax highlighting
Source Link
amoeba
  • 107.2k
  • 36
  • 321
  • 346

How to justify the error term in factorial ANOVA?

> DV  <- c(41,43,50, 51,43,53,54,46, 45,55,56,60,58,62,62,
+          56,47,45,46,49, 58,54,49,61,52,62, 59,55,68,63,
+          43,56,48,46,47, 59,46,58,54, 55,69,63,56,62,67)

> IV1 <- factor(rep(1:3, c(3+5+7, 5+6+4, 5+4+6)))
> IV2 <- factor(rep(rep(1:3, 3), c(3,5,7, 5,6,4, 5,4,6)))
> anova(lm(DV ~ IV1))                           # full model = unrestricted model (just A)
          Df  Sum Sq Mean Sq F value Pr(>F)
IV1        2  101.11  50.556  0.9342 0.4009
Residuals 42 2272.80  54.114

> anova(lm(DV ~ IV1 + IV2))                     # full model = A+B
          Df  Sum Sq Mean Sq F value   Pr(>F)    
IV1        2  101.11   50.56  1.9833   0.1509    
IV2        2 1253.19  626.59 24.5817 1.09e-07 ***
Residuals 40 1019.61   25.49                     

> anova(lm(DV ~ IV1 + IV2 + IV1:IV2))           # full model = A+B+A:B
          Df  Sum Sq Mean Sq F value    Pr(>F)    
IV1        2  101.11   50.56  1.8102    0.1782    
IV2        2 1253.19  626.59 22.4357 4.711e-07 ***
IV1:IV2    4   14.19    3.55  0.1270    0.9717    
Residuals 36 1005.42   27.93
> DV  <- c(41,43,50, 51,43,53,54,46, 45,55,56,60,58,62,62,
+          56,47,45,46,49, 58,54,49,61,52,62, 59,55,68,63,
+          43,56,48,46,47, 59,46,58,54, 55,69,63,56,62,67)

> IV1 <- factor(rep(1:3, c(3+5+7, 5+6+4, 5+4+6)))
> IV2 <- factor(rep(rep(1:3, 3), c(3,5,7, 5,6,4, 5,4,6)))
> anova(lm(DV ~ IV1))                           # full model = unrestricted model (just A)
          Df  Sum Sq Mean Sq F value Pr(>F)
IV1        2  101.11  50.556  0.9342 0.4009
Residuals 42 2272.80  54.114

> anova(lm(DV ~ IV1 + IV2))                     # full model = A+B
          Df  Sum Sq Mean Sq F value   Pr(>F)    
IV1        2  101.11   50.56  1.9833   0.1509    
IV2        2 1253.19  626.59 24.5817 1.09e-07 ***
Residuals 40 1019.61   25.49                     

> anova(lm(DV ~ IV1 + IV2 + IV1:IV2))           # full model = A+B+A:B
          Df  Sum Sq Mean Sq F value    Pr(>F)    
IV1        2  101.11   50.56  1.8102    0.1782    
IV2        2 1253.19  626.59 22.4357 4.711e-07 ***
IV1:IV2    4   14.19    3.55  0.1270    0.9717    
Residuals 36 1005.42   27.93

How to justify the error term in ANOVA?

> DV  <- c(41,43,50, 51,43,53,54,46, 45,55,56,60,58,62,62,
+          56,47,45,46,49, 58,54,49,61,52,62, 59,55,68,63,
+          43,56,48,46,47, 59,46,58,54, 55,69,63,56,62,67)

> IV1 <- factor(rep(1:3, c(3+5+7, 5+6+4, 5+4+6)))
> IV2 <- factor(rep(rep(1:3, 3), c(3,5,7, 5,6,4, 5,4,6)))
> anova(lm(DV ~ IV1))                           # full model = unrestricted model (just A)
          Df  Sum Sq Mean Sq F value Pr(>F)
IV1        2  101.11  50.556  0.9342 0.4009
Residuals 42 2272.80  54.114

> anova(lm(DV ~ IV1 + IV2))                     # full model = A+B
          Df  Sum Sq Mean Sq F value   Pr(>F)    
IV1        2  101.11   50.56  1.9833   0.1509    
IV2        2 1253.19  626.59 24.5817 1.09e-07 ***
Residuals 40 1019.61   25.49                     

> anova(lm(DV ~ IV1 + IV2 + IV1:IV2))           # full model = A+B+A:B
          Df  Sum Sq Mean Sq F value    Pr(>F)    
IV1        2  101.11   50.56  1.8102    0.1782    
IV2        2 1253.19  626.59 22.4357 4.711e-07 ***
IV1:IV2    4   14.19    3.55  0.1270    0.9717    
Residuals 36 1005.42   27.93

How to justify the error term in factorial ANOVA?

> DV  <- c(41,43,50, 51,43,53,54,46, 45,55,56,60,58,62,62,
+          56,47,45,46,49, 58,54,49,61,52,62, 59,55,68,63,
+          43,56,48,46,47, 59,46,58,54, 55,69,63,56,62,67)

> IV1 <- factor(rep(1:3, c(3+5+7, 5+6+4, 5+4+6)))
> IV2 <- factor(rep(rep(1:3, 3), c(3,5,7, 5,6,4, 5,4,6)))
> anova(lm(DV ~ IV1))                           # full model = unrestricted model (just A)
          Df  Sum Sq Mean Sq F value Pr(>F)
IV1        2  101.11  50.556  0.9342 0.4009
Residuals 42 2272.80  54.114

> anova(lm(DV ~ IV1 + IV2))                     # full model = A+B
          Df  Sum Sq Mean Sq F value   Pr(>F)    
IV1        2  101.11   50.56  1.9833   0.1509    
IV2        2 1253.19  626.59 24.5817 1.09e-07 ***
Residuals 40 1019.61   25.49                     

> anova(lm(DV ~ IV1 + IV2 + IV1:IV2))           # full model = A+B+A:B
          Df  Sum Sq Mean Sq F value    Pr(>F)    
IV1        2  101.11   50.56  1.8102    0.1782    
IV2        2 1253.19  626.59 22.4357 4.711e-07 ***
IV1:IV2    4   14.19    3.55  0.1270    0.9717    
Residuals 36 1005.42   27.93
Tweeted twitter.com/#!/StackStats/status/127098280491483136
deleted 150 characters in body
Source Link
caracal
  • 12.1k
  • 57
  • 68
> DV  <- c(41,43,50, 51,43,53,54,46, 45,55,56,60,58,62,62,
+          56,47,45,46,49, 58,54,49,61,52,62, 59,55,68,63,
+          43,56,48,46,47, 59,46,58,54, 55,69,63,56,62,67)

> IV1 <- factor(rep(1:3, c(3+5+7, 5+6+4, 5+4+6)))
> IV2 <- factor(rep(rep(1:3, 3), c(3,5,7, 5,6,4, 5,4,6)))
> anova(lm(DV ~ IV1))                           # full model = unrestricted model (just A)
Analysis of Variance Table
Response: DV
          Df  Sum Sq Mean Sq F value Pr(>F)
IV1        2  101.11  50.556  0.9342 0.4009
Residuals 42 2272.80  54.114

> anova(lm(DV ~ IV1 + IV2))                     # full model A+B
Analysis of Variance Table
Response:= DVA+B
          Df  Sum Sq Mean Sq F value   Pr(>F)    
IV1        2  101.11   50.56  1.9833   0.1509    
IV2        2 1253.19  626.59 24.5817 1.09e-07 ***
Residuals 40 1019.61   25.49                     

> anova(lm(DV ~ IV1 + IV2 + IV1:IV2))           # full model = A+B+A:B
Analysis of Variance Table
Response: DV
          Df  Sum Sq Mean Sq F value    Pr(>F)    
IV1        2  101.11   50.56  1.8102    0.1782    
IV2        2 1253.19  626.59 22.4357 4.711e-07 ***
IV1:IV2    4   14.19    3.55  0.1270    0.9717    
Residuals 36 1005.42   27.93
> DV  <- c(41,43,50, 51,43,53,54,46, 45,55,56,60,58,62,62,
+          56,47,45,46,49, 58,54,49,61,52,62, 59,55,68,63,
+          43,56,48,46,47, 59,46,58,54, 55,69,63,56,62,67)

> IV1 <- factor(rep(1:3, c(3+5+7, 5+6+4, 5+4+6)))
> IV2 <- factor(rep(rep(1:3, 3), c(3,5,7, 5,6,4, 5,4,6)))
> anova(lm(DV ~ IV1))                           # full model = unrestricted model (just A)
Analysis of Variance Table
Response: DV
          Df  Sum Sq Mean Sq F value Pr(>F)
IV1        2  101.11  50.556  0.9342 0.4009
Residuals 42 2272.80  54.114

> anova(lm(DV ~ IV1 + IV2))                     # full model A+B
Analysis of Variance Table
Response: DV
          Df  Sum Sq Mean Sq F value   Pr(>F)    
IV1        2  101.11   50.56  1.9833   0.1509    
IV2        2 1253.19  626.59 24.5817 1.09e-07 ***
Residuals 40 1019.61   25.49                     

> anova(lm(DV ~ IV1 + IV2 + IV1:IV2))           # full model A+B+A:B
Analysis of Variance Table
Response: DV
          Df  Sum Sq Mean Sq F value    Pr(>F)    
IV1        2  101.11   50.56  1.8102    0.1782    
IV2        2 1253.19  626.59 22.4357 4.711e-07 ***
IV1:IV2    4   14.19    3.55  0.1270    0.9717    
Residuals 36 1005.42   27.93
> DV  <- c(41,43,50, 51,43,53,54,46, 45,55,56,60,58,62,62,
+          56,47,45,46,49, 58,54,49,61,52,62, 59,55,68,63,
+          43,56,48,46,47, 59,46,58,54, 55,69,63,56,62,67)

> IV1 <- factor(rep(1:3, c(3+5+7, 5+6+4, 5+4+6)))
> IV2 <- factor(rep(rep(1:3, 3), c(3,5,7, 5,6,4, 5,4,6)))
> anova(lm(DV ~ IV1))                           # full model = unrestricted model (just A)
          Df  Sum Sq Mean Sq F value Pr(>F)
IV1        2  101.11  50.556  0.9342 0.4009
Residuals 42 2272.80  54.114

> anova(lm(DV ~ IV1 + IV2))                     # full model = A+B
          Df  Sum Sq Mean Sq F value   Pr(>F)    
IV1        2  101.11   50.56  1.9833   0.1509    
IV2        2 1253.19  626.59 24.5817 1.09e-07 ***
Residuals 40 1019.61   25.49                     

> anova(lm(DV ~ IV1 + IV2 + IV1:IV2))           # full model = A+B+A:B
          Df  Sum Sq Mean Sq F value    Pr(>F)    
IV1        2  101.11   50.56  1.8102    0.1782    
IV2        2 1253.19  626.59 22.4357 4.711e-07 ***
IV1:IV2    4   14.19    3.55  0.1270    0.9717    
Residuals 36 1005.42   27.93
edited title
Link
user88
user88

ANOVA: how How to justify the error term in ANOVA?

Source Link
caracal
  • 12.1k
  • 57
  • 68
Loading