我想知道GLM模型中成对多重比较的区别和解释。
如果我需要考虑模型中的重复。
请参阅下面的示例:
首先,我创建一些变量
set.seed(123)
d<-NULL
N<-54
d$Production <- rgamma(N,10)
d$Feature <- ifelse(d$Production >7 & d$Production<10, c("A"),ifelse(d$Production>11,
c("B"), c("C")))
d$Feature<-sort(d$Feature)
#d$Temp<-rnorm(N,20,5)
d$Temp<-rep(1:3,18)
d$Rep<-sort(rep(1:3,18),decreasing=TRUE)
d<-as.data.frame(d)
#
第二,我进行成对的多重比较而不重复:
# Gamma glm model and pair-wise comparison without repetition
m1<- glm(Production ~ Feature + Temp, family= Gamma, data = d)
cld(glht(m1, linfct = mcp(Feature = "Tukey")),decreasing=TRUE)
#
A B C
"a" "a" "a"
第三,我考虑重复:
# Gamma glm model and pair-wise comparison with repetition
m2<- glm(Production ~ Feature + Temp + Rep, family= Gamma, data = d)
cld(glht(m2, linfct = mcp(Feature = "Tukey")),decreasing=TRUE)
#
A B C
"a" "ab" "b"
我的问题是,如果这个决定改变了结果,正确的统计方法是什么?
预先感谢