与平均值相比,cld Tukey 字母未显示正确的组

问题描述

我正在使用 multcomp 包及其 cld 函数运行 Tukey HSD 事后检验,以分析我的线性混合效应模型在嵌套裂区设计试验中的差异。出于某种原因,Tukey 字母不再显示正确的组(它曾经有效):这意味着清楚地显示了与我将字母显示分配给什么不同的图片。有人能告诉我这里有什么问题吗?

均值和标准误

#SE function
sem = function(x)
      {
           n = sum(!is.na(x))
           sqrt(var(x,na.rm=T)/n)
      }

mean<-tapply(mydata$p5,list(mydata$ft),mean,na.rm=TRUE)#means
se<-tapply(mydata$p5,sem)#se
cbind(mean,se)

我的带有 Tukey 字母的模型:

mydata.lme<-lme(p5~ft,data=mydata,random=~1|bl/yr/cp/vr/amf,na.action=na.omit)
tuk=summary(glht(mydata.lme,linfct=mcp(ft="Tukey")),test=univariate())#glht
cld(tuk,level=0.05,decreasing = TRUE) #letters
summary(tuk) 

还有我邪恶的数据集(抱歉):

> dput(mydata)
structure(list(yr = structure(c(1L,1L,1L),.Label = c("1","2"),class = "factor"),qn = c(29.2,29.2,29.1,26.2,26.1,20.2,20.1,19.2,19.1,4.2,4.1,3.2,3.1,32.2,32.1,33.2,33.1,33.1),bl = structure(c(4L,4L,2L,3L,3L),"2","3","4"),pl = c(1L,5L,6L,7L,8L,9L,10L,11L,12L,13L,14L,15L,16L,25L,26L,27L,28L,29L,30L,31L,32L,33L,34L,35L,36L,37L,38L,39L,40L,41L,42L,43L,44L,45L,46L,47L,48L,49L,50L,51L,52L,53L,54L,55L,56L,65L,66L,67L,68L,69L,70L,71L,72L,73L,74L,75L,76L,77L,78L,79L,80L,81L,82L,83L,84L,85L,86L,87L,88L,89L,90L,91L,92L,93L,94L,95L,96L,105L,106L,107L,108L,109L,110L,111L,112L,113L,114L,115L,116L,117L,118L,119L,120L,121L,122L,123L,124L,125L,126L,127L,128L,129L,130L,131L,132L,133L,134L,135L,136L,145L,146L,147L,148L,149L,150L,151L,152L,153L,154L,155L,156L,157L,158L,159L,160L),cp = structure(c(2L,2L),.Label = c("CCP","OCP"),vr = structure(c(1L,.Label = c("ASZ","SKY"),amf = structure(c(1L,.Label = c("M0","M1"),ft = structure(c(2L,.Label = c("BG","CM","MN","ZE"),p5 = c(24.2,3.5,4.133333333,NA,44.23333333,26.03333333,21.16666667,14.83333333,7.866666667,20.7,13.5,31.33333333,17.7,8.5,20,22.53333333,25.43333333,29.5,24.33333333,28.73333333,21.33333333,6.4,12.33333333,31.36666667,47.53333333,13,20.03333333,26.66666667,32.83333333,4.533333333,15.53333333,29.4,11.7,10.5,12.4,4.733333333,28.53333333,31.16666667,10.06666667,19.3,14.73333333,7.2,12.2,31.73333333,6.666666667,49,26,49.5,29.36666667,34,42,22,23,25.53333333,56.73333333,63.16666667,30.2,32.7,36.53333333,8.033333333,23.4,18.53333333,30.5,51.33333333,43.66666667,1.166666667,8.833333333,49.53333333,17.2,35.73333333,37.86666667,29.76666667,55.86666667,29.16666667,48.83333333,30.4,34.2,5.866666667,8.533333333,16.33333333,2.866666667,25.66666667,25.33333333,33,2.333333333,24.2,1.333333333,28.83333333,40.33333333,39,14.86666667,40.86666667,17.76666667,34.23333333,35,23.33333333,30.66666667,39.06666667,27,18.3,18.06666667,2.2,24.53333333,8.366666667,27.86666667,18.66666667,4.666666667,8,3.666666667,8.333333333,20.5,8.733333333,22.16666667,12.53333333,4.333333333,2.6,16.03333333,21.1,9.866666667)),class = "data.frame",row.names = c(NA,-128L))

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...