Dunnett 检验是各种处理与对照的单向 ANOVA 的典型检验。与在基线假设下使用 Bonferoni 校正的多个独立 t 检验相比,它的统计功效略高。
请参阅有关 Dunnett 测试的 Wikipedia 条目: https ://en.wikipedia.org/wiki/Dunnett%27s_test
任何优秀的实验设计教科书都会讨论单向方差分析和 Dunnett 检验。请参阅此 STATS 503 课程: https ://online.stat.psu.edu/stat503/lesson/3/3.1
以下是 R 代码中的示例分析:
require(DescTools)
#> Loading required package: DescTools
require(ggplot2)
#> Loading required package: ggplot2
# Simulate Data
set.seed(184873)
NperTreat <- 20
dat <- data.frame(group = factor(rep(c("Control", "Treat1", "Treat2"), each = NperTreat)),
t1 = rnorm(3*NperTreat, 74.7, 15.46),
t2 = c(rnorm(NperTreat, 74.7, 15.46),
rnorm(NperTreat, 74.7 - 2, 15.46),
rnorm(NperTreat, 74.7 - 15, 15.46)))
dat$weight_difference <- dat$t2 - dat$t1
ggplot(dat, aes(x = group, y = weight_difference)) + geom_boxplot()

mod1 <- aov(weight_difference ~ group, data = dat)
summary(mod1)
#> Df Sum Sq Mean Sq F value Pr(>F)
#> group 2 6043 3022 4.827 0.0116 *
#> Residuals 57 35684 626
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# There is at least one difference between the group means p = 0.00116
DescTools::DunnettTest(dat$weight_difference, g = dat$group, control = "Control")
#>
#> Dunnett's test for comparing several treatments with a control :
#> 95% family-wise confidence level
#>
#> $Control
#> diff lwr.ci upr.ci pval
#> Treat1-Control -0.9113978 -18.85869 17.035898 0.9903
#> Treat2-Control -21.7305135 -39.67781 -3.783218 0.0153 *
#>
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# there is insufficient evidence to conclude treatment1 is differnt from control p = 0.9903
# treatment 2 is different from control by an estimated 21 kg p = 0.0153
################################################################################
# Two independent t-tests have less power than Dunnett's to detect a difference
# a test at alpha = 0.05 / 2 is equivalent to a confidence level of 1 - 0.05 / 2
with(dat, t.test(weight_difference[group == "Treat1"],
weight_difference[group == "Control"],
conf.level = 0.975))
#>
#> Welch Two Sample t-test
#>
#> data: weight_difference[group == "Treat1"] and weight_difference[group == "Control"]
#> t = -0.10537, df = 37.985, p-value = 0.9166
#> alternative hypothesis: true difference in means is not equal to 0
#> 97.5 percent confidence interval:
#> -21.09656 19.27376
#> sample estimates:
#> mean of x mean of y
#> -1.8206320 -0.9092341
with(dat, t.test(weight_difference[group == "Treat2"],
weight_difference[group == "Control"],
conf.level = 0.975))
#>
#> Welch Two Sample t-test
#>
#> data: weight_difference[group == "Treat2"] and weight_difference[group == "Control"]
#> t = -2.9104, df = 34.572, p-value = 0.006276
#> alternative hypothesis: true difference in means is not equal to 0
#> 97.5 percent confidence interval:
#> -39.226556 -4.234471
#> sample estimates:
#> mean of x mean of y
#> -22.6397477 -0.9092341
################################################################################
# with additional co-variates, you can switch to a regression
dat$age <- runif(NperTreat*3, 18, 65)
lm1 <- lm(weight_difference ~ group + age, data = dat)
summary(lm1)
#>
#> Call:
#> lm(formula = weight_difference ~ group + age, data = dat)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -50.505 -19.415 2.283 16.157 60.701
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 1.96136 11.56566 0.170 0.86595
#> groupTreat1 -1.17136 8.02909 -0.146 0.88453
#> groupTreat2 -21.55551 8.00057 -2.694 0.00929 **
#> age -0.06888 0.24229 -0.284 0.77723
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 25.23 on 56 degrees of freedom
#> Multiple R-squared: 0.1461, Adjusted R-squared: 0.1003
#> F-statistic: 3.193 on 3 and 56 DF, p-value: 0.03038
# There is at least one significant explanatory variable p = 0.03038
# After accounting for age, there is insufficient evidence to conclude there is a difference due to treatment 1 p = 0.88453
# After accounting for age, there is a significant effect due to Treatment 2 p = 0.00929