R 4.3.3 | car 3.1.2 --- descriptive --- group weight.n weight.mean weight.sd 1 ctrl 10.000 5.032 0.583 2 trt1 10.000 4.661 0.794 3 trt2 10.000 5.526 0.443 --- assumptions --- d$group: ctrl [1] 0.7475 ------------------------------------------------------------ d$group: trt1 [1] 0.4519 ------------------------------------------------------------ d$group: trt2 [1] 0.5643 Levene center=median: Levene's Test for Homogeneity of Variance (center = median) Df F value Pr(>F) group 2 1.1192 0.3412 27 Levene center=mean: Levene's Test for Homogeneity of Variance (center = mean) Df F value Pr(>F) group 2 1.237 0.3062 27 --- one-way ANOVA (equal variances) --- Df Sum Sq Mean Sq F value Pr(>F) group 2 3.766 1.8832 4.846 0.0159 * Residuals 27 10.492 0.3886 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 eta squared = 0.264 --- Welch ANOVA --- One-way analysis of means (not assuming equal variances) data: weight and group F = 5.181, num df = 2.000, denom df = 17.128, p-value = 0.01739 --- Tukey HSD --- Tukey multiple comparisons of means 95% family-wise confidence level Fit: aov(formula = weight ~ group, data = d) $group diff lwr upr p adj trt1-ctrl -0.371 -1.0622161 0.3202161 0.3908711 trt2-ctrl 0.494 -0.1972161 1.1852161 0.1979960 trt2-trt1 0.865 0.1737839 1.5562161 0.0120064 --- Kruskal-Wallis --- Kruskal-Wallis rank sum test data: weight by group Kruskal-Wallis chi-squared = 7.9882, df = 2, p-value = 0.01842 --- two groups: Student versus Welch (ctrl vs trt1) --- Two Sample t-test data: weight by group t = 1.1913, df = 18, p-value = 0.249 alternative hypothesis: true difference in means between group ctrl and group trt1 is not equal to 0 95 percent confidence interval: -0.2833003 1.0253003 sample estimates: mean in group ctrl mean in group trt1 5.032 4.661 Welch Two Sample t-test data: weight by group t = 1.1913, df = 16.524, p-value = 0.2504 alternative hypothesis: true difference in means between group ctrl and group trt1 is not equal to 0 95 percent confidence interval: -0.2875162 1.0295162 sample estimates: mean in group ctrl mean in group trt1 5.032 4.661 --- why results differ: unbalanced two-way design, simulated --- b1 b2 a1 22 8 a2 6 12 Type I (sequential, A first): Analysis of Variance Table Response: y Df Sum Sq Mean Sq F value Pr(>F) A 1 56.437 56.437 29.3245 2.421e-06 *** B 1 41.031 41.031 21.3199 3.374e-05 *** A:B 1 3.497 3.497 1.8171 0.1846 Residuals 44 84.680 1.925 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Type II: Anova Table (Type II tests) Response: y Sum Sq Df F value Pr(>F) A 19.295 1 10.0256 0.002803 ** B 41.031 1 21.3199 3.374e-05 *** A:B 3.497 1 1.8171 0.184555 Residuals 84.680 44 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Type III: Anova Table (Type III tests) Response: y Sum Sq Df F value Pr(>F) (Intercept) 4954.2 1 2574.1972 < 2.2e-16 *** A 19.4 1 10.1018 0.00271 ** B 35.2 1 18.3093 9.979e-05 *** A:B 3.5 1 1.8171 0.18456 Residuals 84.7 44 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 --- missing data: listwise vs available --- mean with NA, default: NA mean na.rm=TRUE: 5.113 --- quantile definitions on ctrl --- type 1 Q1 = 4.53 type 2 Q1 = 4.53 type 6 Q1 = 4.5225 type 7 Q1 = 4.55