我目前正在 R 中对 4 个子因素进行重复测量分析:SF1、SF2、SF3、SF4
首先,需要注意的是,违反了球形假设,样本量被认为是合理的大(N = 188)。然而,组大小并不相等。
设置对比以显示 SF1 和 SF2(组合)显着高于 SF3 和 SF4(组合)。而 SF1 和 SF2(之间)和 SF3 和 SF4(之间)的值没有显着差异。IE
Contr1<-c(1, 1, -1, -1)
Contr2<-c(1, -1, 0, 0)
Contr3<-c(0, 0, 1, -1)
contrasts(rep_table_long$Subfactor)<-cbind(Contr1, Contr2, Contr3)
通用型号代码如下
rep_model <- lme(Value ~ Subfactor, random = ~1|Subject/Subfactor, data = rep_table_long, method ="ML")
通过执行summary(rep_model)
我收到以下(截断)输出
Fixed effects: Value ~ Subfactor
Value Std.Error DF t-value p-value
(Intercept) 5.498910 0.07229032 561 76.06703 0.0000
SubfactorContr1 0.459601 0.03066438 561 14.98811 0.0000
SubfactorContr2 0.085266 0.04336598 561 1.96619 0.0498
SubfactorContr3 0.093617 0.04336598 561 2.15877 0.0313
因此,显示 SF1&SF2 明显大于 SF3&SF4。但 SF1 也明显大于 SF2,SF3 > SF4 也是如此。
但是,这就是我提出问题的原因,事后 Tukey 测试显示了不同的结果:
> postHocs <- glht (rep_model, linfct = mcp(Subfactor = "Tukey"))
> summary(postHocs)
Simultaneous Tests for General Linear Hypotheses
Multiple Comparisons of Means: Tukey Contrasts
Fit: lme.formula(fixed = Value ~ Subfactor, data = rep_table_long, random = ~1 | Subject/Subfactor, method = "ML")
Linear Hypotheses:
Estimate Std. Error z value Pr(>|z|)
SF2- SF1 == 0 -0.1872 0.0865 -2.165 0.133
SF3- SF1 == 0 -0.9275 0.0865 -10.723 <0.001
SF4- SF1 == 0 -1.0981 0.0865 -12.694 <0.001
SF3- SF2 == 0 -0.7403 0.0865 -8.559 <0.001
SF4- SF2 == 0 -0.9109 0.0865 -10.530 <0.001
SF4- SF3 == 0 -0.1705 0.0865 -1.971 0.199`
事后 Tukey 测试的结果表明,SF2 和 SF1 之间以及 SF4 和 SF3 之间的差异没有显着差异。
为什么我在两次测试中得到不同的结果?是因为违反了球形度吗?还是我在这里做错了什么?
非常感谢任何帮助。