0

我有来自 6 种不同治疗方法的数据,在 3 年内重复采样 8 次(没有丢失数据点)。我每次处理的个人垃圾箱均分为 7 个随机分布的块。为了分析,我使用的是混合模型(nlme 包)。

数据示例:

bin     treatment   Bloc        date        CONTAM
b1      TR_A            1       t0      4.753038458
b2      TR_A            2       t0      4.709589136
b3      TR_A            3       t0      4.72668357
b4      TR_A            4       t0      4.647430928
b5      TR_A            5       t0      4.670129151
b6      TR_A            6       t0      4.647430928
b7      TR_A            7       t0      4.811256762
b8      TR_B            1       t0      4.551238194
b9      TR_B            2       t0      4.662660293
b10     TR_B            3       t0      4.753038458
b11     TR_B            4       t0      4.69554541
b12     TR_B            5       t0      4.69554541

使用的包:

nlme ; lattice ; nortest ; multcomp

这是我目前使用的脚本:

mod.lme=lme(CONTAM~Treatment*date,random=~1|bloc/bin,data=data)
summary(mod.lme)
anova(mod.lme)
summary(glht(mod.lme, linfct=mcp(Treatment = "Tukey")), test = adjusted(type = "bonferroni"))

这工作得很好(ANOVA<0.001),但没有给我我需要的信息。

-> 我获得了一个整体的Tukey,但由于我正在处理退化数据,我希望处理在开始和结束时是相似的,但在中间是不同的。

----> 因此,我正在寻找一个测试,它会给我每个采样日期的 RANKED (a, ab, bc...) Tukey 结果,同时考虑到这是一个重复测量模型。

有任何想法吗?:)

谢谢!




仅供参考,我已经尝试了这个问题的解决方案:post hoc test for a two way mixed model anova

1

library(GAD)
snk.test(mod.lme, term="Treatment*date", among="Treatment", within="date")

我不确定的结果:# Object$model[, 2:(length(object$x) + 1)] 中的错误:维数不正确

2

第二个给了我一个巨大的输出,但不是我需要的。

library(lsmeans)
summary(lsmeans(mod.lme, pairwise~Treatment*date), infer=TRUE)
4

1 回答 1

0

试试这个:

获得 LS 意味着:

library("lsmeans")
mod.lsm <- lsmeans::lsmeans(mod.lme, ~ Treatment * date)

(调用lsmeans::lsmeans会阻止它使用lmerTest包中的相同函数,如果它恰好被加载的话。)

列出 LS 均值:

mod.lsm

分别对每个 进行成对比较date

pairs(mod.lsm, by = "date")

(默认结果显示 $t$ 测试和使用 Tukey 方法调整的 $P$ 值。)

于 2017-04-01T18:29:57.817 回答