混合模型 [代替重复测量方差分析],但需要每个采样日期的 RANKED Tukey 结果(不是整体)

Mixed Model [in place of Repeated Measures ANOVA], but need RANKED Tukey results PER sampling date (NOT overall)

I have data from 6 different treatments, with sampling repeated 8 times over 3 years (no missing data points). My individual bins from each treatment are equally split in 7 randomly distributed blocks. To analyze, I am using a Mixed Model (nlme package).

数据示例:

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) 但没有提供我需要的信息。

-> 我获得了 overall Tukey,但由于我正在处理退化数据,我希望处理在开始和结束,但中间不同。

----> Therefore, I am seeking a test that will give me the RANKED (a, ab, bc...) Tukey results PER sampling date, while taking in consideration that this is a repeated measures model.

有什么想法吗? :)

谢谢!




仅供参考,我尝试了这个问题的解决方案:

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)

试试这个:

获取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$ 值。)