5. 다중 비교하기
# 그룹별 평균 차이에 대해서 가능한 그룹 쌍에 대해 쌍체 t 검정하기 >>> pairwise.t.test(count, spray, p.adjust="bonferroni") Pairwise comparisons using t tests with pooled SD data: count and spray A B C D E B 1 - - - - C 1.1e-09 1.3e-10 - - - D 1.5e-06 1.8e-07 1 - - E 4.1e-08 4.9e-09 1 1 - F 1 1 4.2e-12 6.1e-09 1.6e-10 P value adjustment method: bonferroni # 투키 HSD 검정하기 >>> TukeyHSD(aov.out) Tukey multiple comparisons of means 95% family-wise confidence level Fit: aov(formula = count ~ spray, data = InsectSprays) $spray diff lwr upr p adj B-A 0.8333333 -3.866075 5.532742 0.9951810 C-A -12.4166667 -17.116075 -7.717258 0.0000000 D-A -9.5833333 -14.282742 -4.883925 0.0000014 E-A -11.0000000 -15.699409 -6.300591 0.0000000 F-A 2.1666667 -2.532742 6.866075 0.7542147 C-B -13.2500000 -17.949409 -8.550591 0.0000000 D-B -10.4166667 -15.116075 -5.717258 0.0000002 E-B -11.8333333 -16.532742 -7.133925 0.0000000 F-B 1.3333333 -3.366075 6.032742 0.9603075 D-C 2.8333333 -1.866075 7.532742 0.4920707 E-C 1.4166667 -3.282742 6.116075 0.9488669 F-C 14.5833333 9.883925 19.282742 0.0000000 E-D -1.4166667 -6.116075 3.282742 0.9488669 F-D 11.7500000 7.050591 16.449409 0.0000000 F-E 13.1666667 8.467258 17.866075 0.0000000