简体   繁体   English

混合模型[代替重复测量方差分析],但需要按采样日期排列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). 我有6种不同治疗方法的数据,并在3年​​中重复了8次采样(没有丢失数据点)。 My individual bins from each treatment are equally split in 7 randomly distributed blocks. 我从每种处理中获得的单个垃圾箱平均分为7个随机分布的块。 To analyze, I am using a Mixed Model (nlme package). 为了进行分析,我使用的是混合模型(nlme软件包)。

Example of the data : 数据示例:

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

Packages used: 使用的软件包:

nlme ; lattice ; nortest ; multcomp

Here is the script I am currently using: 这是我当前正在使用的脚本:

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"))

This works just fine (ANOVA<0.001) but is not giving me the information I need. 这工作得很好(ANOVA <0.001),但没有提供我所需的信息。

-> I obtain an overall Tukey, but since I am dealing with degradation data I expect the treatments to be similar at the beginning and end, but DIFFERENT in the middle. ->我获得了一个整体的 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. ---->因此,我在考虑将其作为重复测量模型的同时,寻求一种能够给我RANKED(a,ab,bc ...)Tukey结果每个采样日期的测试。

Any ideas? 有任何想法吗? :) :)

Thanks! 谢谢!




FYI, I've attempted the solutions from this question: post hoc test for a two way mixed model anova 仅供参考,我已经尝试过以下问题的解决方案: 事后测试两种混合模型方差分析

1 1

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

My inconclusive result : # Error in object$model[, 2:(length(object$x) + 1)] : incorrect number of dimensions 我的不确定性结果:#object $ model [,2:(length(object $ x)+1)]错误:尺寸错误

2 2

This second one gives me a huge output, but not the one I need. 第二个给了我很大的输出,但不是我需要的。

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

Try this: 尝试这个:

Obtain the LS means: 获得LS表示:

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

(Calling lsmeans::lsmeans prevents it from using the same function in the lmerTest package, if it happens to be loaded.) (调用lsmeans::lsmeans阻止它在lmerTest软件包中使用相同的功能(如果恰好已加载)。)

List the LS means: 列出LS的意思是:

mod.lsm

Do pairwise comparisons, separately for each date : 对每个date分别进行成对比较:

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

(The default result shows $t$ tests and adjusted $P$ values using the Tukey method.) (默认结果显示$ t $测试和使用Tukey方法调整后的$ P $值。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM