因此该代码可以正常工作,但是它使用了第一级处理,即ABA;但是,我需要将其设置为变量Control。有没有办法做到这一点,还是应该重命名变量以首先获得Control?
summary(plant)
library(multcomp)
grow<-glht(mod4,linfct = mcp(Type = "Dunnett"),
alternative = "greater")
summary(grow)
答案 0 :(得分:0)
具有 file_time files
0 2018-08-28 02:30:00 [20180828-024308.dat, 20180828-024434.dat]
1 2018-08-28 03:00:00 [20180828-030335.dat, 20180828-032114.dat]
2 2018-08-28 03:30:00 []
3 2018-08-28 04:00:00 [20180828-040041.dat]
函数的解决方案:
contrMat
library(multcomp)
fit <- lm(Sepal.Width ~ Species, data = iris)
groups <- table(iris$Species)
# setosa versicolor virginica
# 50 50 50
contrastMatrix <- contrMat(groups, base = 2) # 2 <=> versicolor
glht(fit, linfct = mcp(Species=contrastMatrix), alternative='less')