对 glmer 数据的事后测试

如何解决对 glmer 数据的事后测试

我正在对我的数据运行 GLM 模型,该模型似乎运行良好(数据不是正态分布的),并且希望进行一些事后测试。我看过很多关于 ANOVA 的例子,但没有一个我可以遵循的 GLM 输出。

这是数据。我想看看治疗是否会影响植物的疾病症状。每个处理有 6 个生物代表,也就是每个实验的植物,每个处理总共有 3 个实验 (18)。对于每株植物,我计算每平方毫米装载的孢子数(密度),这些孢子中有多少会发芽并形成 APP(Apresoria),以及其中有多少能够成功感染植物 SH(次生菌丝)。请注意,对 APP 或 SH 进行计数。如果每个细菌的 %SH (APP+SH) 低于 -ve 无治疗对照 (PTOZ,MLOS),则表明治疗减少了感染。 MLO_1_ECPY 是一种已知可减少感染和 %SH 的 +ve 控制。

     Treatment Exp Density Conidia App  SH Germ
1   MLO_1_ECPY   7      67      39 307  60  367
2   MLO_1_ECPY   7      67      19 350  16  366
3   MLO_1_ECPY   7      67      27 334  23  357
4   MLO_1_ECPY   7      67      28 351  21  372
5   MLO_1_ECPY   7      67      34 339  25  364
6   MLO_1_ECPY   7      67      23 326  33  359
7   MLO_1_ECPY   8      18      48 308  14  322
8   MLO_1_ECPY   8      18      33 313  13  326
9   MLO_1_ECPY   8      18      47 307  11  318
10  MLO_1_ECPY   8      18      20 307  15  322
11  MLO_1_ECPY   8      18      38 311  12  323
12  MLO_1_ECPY   8      18      35 330  15  345
13  MLO_1_ECPY   9      72      36 317  10  327
14  MLO_1_ECPY   9      72      56 326   3  329
15  MLO_1_ECPY   9      72      35 320   9  329
16  MLO_1_ECPY   9      72      51 329  10  339
17  MLO_1_ECPY   9      72      47 326   6  332
18  MLO_1_ECPY   9      72      79 325   6  331
19 MLOs_1_ECPY  10      57     229 260  40  300
20 MLOs_1_ECPY  10      57     164 308  45  353
21 MLOs_1_ECPY  10      57      67 320  29  349
22 MLOs_1_ECPY  10      57      62 336  60  396
23 MLOs_1_ECPY  10      57     101 309  62  371
24 MLOs_1_ECPY  10      57      82 330  75  405
25 MLOs_1_ECPY  11      60      66 328  40  368
26 MLOs_1_ECPY  11      60      50 323  56  379
27 MLOs_1_ECPY  11      60      39 320  41  361
28 MLOs_1_ECPY  11      60      83 300  42  342
29 MLOs_1_ECPY  11      60      37 315  42  357
30 MLOs_1_ECPY  11      60      44 208  43  251
31 MLOs_1_ECPY  12      47      68 333  62  395
32 MLOs_1_ECPY  12      47      61 310  66  376
33 MLOs_1_ECPY  12      47      38 258  35  293
34 MLOs_1_ECPY  12      47      68 339  44  383
35 MLOs_1_ECPY  12      47      31 324  26  350
36 MLOs_1_ECPY  12      47      42 319  47  366
37  NOD_1_ECPY   7      67      28 331  23  354
38  NOD_1_ECPY   7      67      38 328  23  351
39  NOD_1_ECPY   7      67      23 326  49  375
40  NOD_1_ECPY   7      67      29 322   4  326
41  NOD_1_ECPY   7      67      30 333   8  341
42  NOD_1_ECPY   7      67      20 327  20  347
43  NOD_1_ECPY   8      18      27 313  15  328
44  NOD_1_ECPY   8      18      28 322  21  343
45  NOD_1_ECPY   8      18      27 315  40  355
46  NOD_1_ECPY   8      18      43 320  11  331
47  NOD_1_ECPY   8      18      23 306  18  324
48  NOD_1_ECPY   8      18      49 312   9  321
49  NOD_1_ECPY   9      72      66 333   9  342
50  NOD_1_ECPY   9      72      81 343  10  353
51  NOD_1_ECPY   9      72      42 306  35  341
52  NOD_1_ECPY   9      72      23 313  13  326
53  NOD_1_ECPY   9      72      76 340  10  350
54  NOD_1_ECPY   9      72      87 246 104  350
55  NOD_2_ECPY   7      67      26 335  14  349
56  NOD_2_ECPY   7      67      27 335  27  362
57  NOD_2_ECPY   7      67      54 328  10  338
58  NOD_2_ECPY   7      67      39 311   5  316
59  NOD_2_ECPY   7      67      56 309  15  324
60  NOD_2_ECPY   7      67      38 306  11  317
61  NOD_2_ECPY   8      18      31 305  15  320
62  NOD_2_ECPY   8      18      19 317  12  329
63  NOD_2_ECPY   8      18      19 300  20  320
64  NOD_2_ECPY   8      18      45 315   6  321
65  NOD_2_ECPY   8      18      26 333  16  349
66  NOD_2_ECPY   8      18      40 338  25  363
67  NOD_2_ECPY   9      72      58 338  20  358
68  NOD_2_ECPY   9      72      70 229   5  234
69  NOD_2_ECPY   9      72      53 321  11  332
70  NOD_2_ECPY   9      72      54 347  12  359
71  NOD_2_ECPY   9      72      57 333  21  354
72  NOD_2_ECPY   9      72      35 320  10  330
73 PTOZ_1_ECPY   7      63      40 321  64  385
74 PTOZ_1_ECPY   7      63      64 288  72  360
75 PTOZ_1_ECPY   7      63      75 289  99  388
76 PTOZ_1_ECPY   7      63      29 333  41  374
77 PTOZ_1_ECPY   7      63      51 300  91  391
78 PTOZ_1_ECPY   7      63      55 318  55  373
79 PTOZ_1_ECPY   8      18      26 298  61  359
80 PTOZ_1_ECPY   8      18      27 313  71  384
81 PTOZ_1_ECPY   8      18      32 308  31  339
82 PTOZ_1_ECPY   8      18      39 310  78  388
83 PTOZ_1_ECPY   8      18      49 307  76  383
84 PTOZ_1_ECPY   8      18      55 305  73  378
85 PTOZ_1_ECPY   9      72      77 306  32  338
86 PTOZ_1_ECPY   9      72      88 312  26  338
87 PTOZ_1_ECPY   9      72      99 323  49  372
88 PTOZ_1_ECPY   9      72      65 314  30  344
89 PTOZ_1_ECPY   9      72      66 312  40  352
90 PTOZ_1_ECPY   9      72      49 311  37  348

我从另一个博士生那里收到的代码是

library("lme4",lib.loc="~/R/win-library/3.5")
propSH<-cbind(NMM_SH$SH,NMM_SH$Germ) 

我的理解是这是为了计算 SH 的比例,但我知道有些用户强烈反对使用 bind 函数

NMM_SH_GLM<-glmer(propSH~NMM_SH$Treatment+NMM_SH$Density+(1|NMM_SH$Exp),data=NMM_SH,family=binomial,nAGQ=0)

> summary(NMM_SH_GLM)
Generalized linear mixed model fit by maximum likelihood (Adaptive Gauss-Hermite Quadrature,nAGQ = 0) ['glmerMod']
 Family: binomial  ( logit )
Formula: propSH ~ NMM_SH$Treatment + NMM_SH$Density + (1 | NMM_SH$Exp)
   Data: NMM_SH

     AIC      BIC   logLik deviance df.resid 
   972.1    989.6   -479.1    958.1       83 

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-4.2608 -1.3113 -0.5942  0.9541 16.5540 

Random effects:
 Groups     Name        Variance Std.Dev.
 NMM_SH$Exp (Intercept) 0.01174  0.1084  
Number of obs: 90,groups:  NMM_SH$Exp,6

Fixed effects:
                             Estimate Std. Error z value Pr(>|z|)    
(Intercept)                 -2.944046   0.166355 -17.697  < 2e-16 ***
NMM_SH$TreatmentMLOs_1_ECPY  1.016374   0.112644   9.023  < 2e-16 ***
NMM_SH$TreatmentNOD_1_ECPY   0.338702   0.077553   4.367 1.26e-05 ***
NMM_SH$TreatmentNOD_2_ECPY  -0.137418   0.087014  -1.579    0.114    
NMM_SH$TreatmentPTOZ_1_ECPY  1.147965   0.068048  16.870  < 2e-16 ***
NMM_SH$Density              -0.001570   0.002714  -0.579    0.563    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
              (Intr) NMM_SH$TM NMM_SH$TNOD_1 NMM_SH$TNOD_2 NMM_SH$TP
NMM_SH$TMLO   -0.350                                                
NMM_SH$TNOD_1 -0.272  0.399                                         
NMM_SH$TNOD_2 -0.245  0.355     0.516                               
NMM_SH$TPTO   -0.368  0.450     0.659         0.588                 
NMM_SH$Dnst   -0.856 -0.053     0.002         0.005         0.070  

这是我得到的;如果有人可以帮助我了解 Post-Hoc 测试(Tukey Games-Howell)所需的变量,我将不胜感激。这是我最后的手段哈哈!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-
参考1 参考2 解决方案 # 点击安装源 协议选择 http:// 路径填写 mirrors.aliyun.com/centos/8.3.2011/BaseOS/x86_64/os URL类型 软件库URL 其他路径 # 版本 7 mirrors.aliyun.com/centos/7/os/x86
报错1 [root@slave1 data_mocker]# kafka-console-consumer.sh --bootstrap-server slave1:9092 --topic topic_db [2023-12-19 18:31:12,770] WARN [Consumer clie
错误1 # 重写数据 hive (edu)&gt; insert overwrite table dwd_trade_cart_add_inc &gt; select data.id, &gt; data.user_id, &gt; data.course_id, &gt; date_format(
错误1 hive (edu)&gt; insert into huanhuan values(1,&#39;haoge&#39;); Query ID = root_20240110071417_fe1517ad-3607-41f4-bdcf-d00b98ac443e Total jobs = 1
报错1:执行到如下就不执行了,没有显示Successfully registered new MBean. [root@slave1 bin]# /usr/local/software/flume-1.9.0/bin/flume-ng agent -n a1 -c /usr/local/softwa
虚拟及没有启动任何服务器查看jps会显示jps,如果没有显示任何东西 [root@slave2 ~]# jps 9647 Jps 解决方案 # 进入/tmp查看 [root@slave1 dfs]# cd /tmp [root@slave1 tmp]# ll 总用量 48 drwxr-xr-x. 2
报错1 hive&gt; show databases; OK Failed with exception java.io.IOException:java.lang.RuntimeException: Error in configuring object Time taken: 0.474 se
报错1 [root@localhost ~]# vim -bash: vim: 未找到命令 安装vim yum -y install vim* # 查看是否安装成功 [root@hadoop01 hadoop]# rpm -qa |grep vim vim-X11-7.4.629-8.el7_9.x
修改hadoop配置 vi /usr/local/software/hadoop-2.9.2/etc/hadoop/yarn-site.xml # 添加如下 &lt;configuration&gt; &lt;property&gt; &lt;name&gt;yarn.nodemanager.res