这听起来像是 multcomp-package 的工作,那里有很多资源。也可以看看这本书。
这是一个将两组的响应与对照组进行比较的示例:
require(multcomp)
mice <- data.frame(group=as.factor(rep(c("C","1","2"),rep(6,3))),
score=c(58, 32, 59, 64, 55, 49, 73, 70, 68, 71, 60, 62, 53, 74, 72, 62, 58, 61))
# reoder factor, so that Control is the 1st level
levels(mice$group) <- c("C", "1", "2")
plot(score ~ group, data = mice)

# Anova
mod <- aov(score ~ group, data = mice)
# Multiple Comparisons with Dunnett contrasts (=Compare to control)
summary(glht(mod, linfct=mcp(group = "Dunnett")))
Simultaneous Tests for General Linear Hypotheses
Multiple Comparisons of Means: Dunnett Contrasts
Fit: aov(formula = score ~ group, data = mice)
Linear Hypotheses:
Estimate Std. Error t value Pr(>|t|)
1 - C == 0 -4.000 4.965 -0.806 0.6427
2 - C == 0 -14.500 4.965 -2.920 0.0195 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Adjusted p values reported -- single-step method)
高温下,