我收到错误消息
lsmDrugs=lsmeans(model1, -drug) -drug 中的错误:一元运算符的参数无效“
请问有什么帮助吗?
library(knitr)
library(lsmeans)
drug <- c(rep("A", 2),rep("B", 2),rep("C", 2))
drugDiff <- c(-14, -4, 5, -1, -2, 6)
data<-data.frame(Drug=as.factor(drug),Difference=drugDiff)
data
model1 <- aov(drugDiff ~ drug, data = data)
anova(model1)
kable(anova(model1), format = "markdown")
lsmDrugs = lsmeans(model1, -drug)
summary(contrast(lsmDrugs, method="pairwise",
adjust = "tukey"), infer = c(T, T), level = 0.95, side = "twosided")