lmer 错误:Hessian 在数值上是单数的

如何解决lmer 错误:Hessian 在数值上是单数的

在为我的一项研究(我从另一个人那里接手)寻找最佳模型的过程中,不幸的是,R 为我的首选选项提供了一条错误消息。

只是关于实验的简短信息:3 个物种,每个物种在一个单独的块中,每个块有 4 个处理(其中 3 个感兴趣),每个处理 5 个重复。对模型感兴趣的一项观察结果(总生物量产量)。我认为(如果不是,请怪我,我不是统计学家)这是一个广义的完整块设计,因为我期望块(物种)和治疗之间的相互作用。由于数据分布偏斜,我对我的因变量进行了 sqrt 转换。

数据集(只有 43 个观察)可以在这篇文章的末尾找到

这是给出错误的模型:

 a1<-lmer(sqrt(Yield)~Cuts*Species+Cuts+TN.Yield+0+(1|Species),data=all)

这就是错误:

Warning messages:
1: In checkConv(attr(opt,"derivs"),opt$par,ctrl = control$checkConv,:
  unable to evaluate scaled gradient
2: In checkConv(attr(opt,:
   Hessian is numerically singular: parameters are not uniquely determined

虽然其他(我不喜欢的)工作正常:

b1<-lmer(sqrt(Yield)~Cuts+TN.Yield+0+(1|Species),data=all,na.action = na.omit)
c1<-lmer(sqrt(Yield)~Cuts+0+(1|Species),data=all)
d1<-lmer(sqrt(Yield)~Cuts * TN.Yield * Species + 0 + (1 | Species),data=all)

然而,模型 a1 似乎仍然给我一个输出:

                        Dependent variable:     
                    -----------------------------
                             sqrt(Yield)         
-------------------------------------------------
Cuts0                         0.686***           
                              p = 0.000          
Cuts2                         0.638***           
                              p = 0.000          
Cuts5                         0.380***           
                              p = 0.000          
SpeciesRCG                     -0.061            
                              p = 0.272          
SpeciesTF                      -0.029            
                              p = 0.605          
TN.Yield                      0.403***           
                              p = 0.000          
Cuts2:SpeciesRCG               -0.067            
                              p = 0.404          
Cuts5:SpeciesRCG                0.073            
                              p = 0.364          
Cuts2:SpeciesTF                -0.127            
                              p = 0.103          
Cuts5:SpeciesTF                 0.081            
                              p = 0.297          
-------------------------------------------------
Observations                     43              
Log Likelihood                 26.665            
Akaike Inf. Crit.              -29.330           
Bayesian Inf. Crit.            -8.195            
=================================================
Note:               *p<0.05; **p<0.01; ***p<0.001

有人愿意解释错误的含义(以及如何取悦代码)?不幸的是,我认为这可能是一个更严重的问题。

干杯,克劳迪娅

数据:

   Blok Treatment Species Week     Pot Cuts Days Yield       TC TN.Yield   Yield.day  Yield140   DM
1     1     0 cut      FL   45  Hyk0.1    0  238  0.72 41.40000 0.690816 0.003025210 0.4235294 1.89
2     1     0 cut      FL   45  Hyk0.2    0  238  0.67 41.81667 0.718080 0.002815126 0.3941176 1.69
3     1     0 cut      FL   45  Hyk0.3    0  238  1.45 44.06333 1.076332 0.006092437 0.8529412 3.40
4     1     0 cut      FL   45  Hyk0.4    0  238  1.62 43.14333 1.139088 0.006806723 0.9529412 3.90
5     1     0 cut      FL   45  Hyk0.5    0  238  1.04 42.54333 0.681966 0.004369748 0.6117647 2.54
6     1     2 cut      FL   37  Hyk2.1    2  182  0.88 43.45250 0.965549 0.004835165 0.6769231 2.02
7     1     2 cut      FL   37  Hyk2.2    2  182  1.24 43.47000 1.049044 0.006813187 0.9538462 2.87
8     1     2 cut      FL   37  Hyk2.3    2  182  1.21 43.58750 1.036352 0.006648352 0.9307692 2.81
9     1     2 cut      FL   37  Hyk2.4    2  182  0.56 44.16500 0.532143 0.003076923 0.4307692 1.24
10    1     2 cut      FL   37  Hyk2.5    2  182  1.30 43.69750 1.016196 0.007142857 1.0000000 2.99
11    1     5 cut      FL   44  Hyk5.1    5  231  0.23 42.46000 0.482065 0.000995671 0.1393939 0.56
12    1     5 cut      FL   44  Hyk5.2    5  231  0.48 43.15000 0.748596 0.002077922 0.2909091 1.14
13    1     5 cut      FL   44  Hyk5.3    5  231  0.40 42.62571 0.634108 0.001731602 0.2424242 0.97
14    1     5 cut      FL   44  Hyk5.4    5  231  0.60 42.09000 0.780787 0.002597403 0.3636364 1.43
15    1     5 cut      FL   44  Hyk5.5    5  231  0.33 43.46000 0.470763 0.001428571 0.2000000 0.79
16    3     0 cut      TF   45 Kora0.1    0  238  0.64 42.39333 0.575980 0.002689076 0.3764706 1.58
17    3     0 cut      TF   45 Kora0.2    0  238  1.36 42.84667 0.845687 0.005714286 0.8000000 3.30
18    3     0 cut      TF   45 Kora0.3    0  238  0.76 41.85667 0.937703 0.003193277 0.4470588 1.89
19    3     0 cut      TF   45 Kora0.4    0  238  0.94 42.53333 0.594815 0.003949580 0.5529412 2.37
20    3     0 cut      TF   45 Kora0.5    0  238  0.97 43.54333 0.785654 0.004075630 0.5705882 2.30
21    3     2 cut      TF   37 Kora2.1    2  182  0.27 43.54750 0.207677 0.001483516 0.2076923 0.62
22    3     2 cut      TF   37 Kora2.2    2  182  0.39 43.56250 0.281726 0.002142857 0.3000000 0.92
23    3     2 cut      TF   37 Kora2.3    2  182  0.45 43.07750 0.552136 0.002472527 0.3461538 1.07
24    3     2 cut      TF   37 Kora2.4    2  182  0.73 42.23500 0.719066 0.004010989 0.5615385 1.84
25    3     2 cut      TF   37 Kora2.5    2  182  0.82 43.49750 1.129846 0.004505495 0.6307692 1.92
26    3     5 cut      TF   44 Kora5.1    5  231  0.43 42.76714 0.436980 0.001861472 0.2606061 1.09
27    3     5 cut      TF   44 Kora5.2    5  231  0.32 42.60714 0.488435 0.001385281 0.1939394 0.85
28    3     5 cut      TF   44 Kora5.3    5  231  0.48 42.69143 0.788342 0.002077922 0.2909091 1.20
29    3     5 cut      TF   44 Kora5.4    5  231  0.73 43.34286 0.923832 0.003160173 0.4424242 1.74
30    3     5 cut      TF   44 Kora5.5    5  231  0.60 43.25857 0.798059 0.002597403 0.3636364 1.40
31    2     0 cut     RCG   45  RCG0.1    0  238  0.85 43.91000 0.732087 0.003571429 0.5000000 1.99
32    2     0 cut     RCG   45  RCG0.2    0  238  0.99 44.15000 0.810263 0.004159664 0.5823529 2.29
33    2     0 cut     RCG   45  RCG0.3    0  238  1.50 44.74000 1.704005 0.006302521 0.8823529 3.45
34    2     0 cut     RCG   45  RCG0.4    0  238  0.99 42.47000 0.708496 0.004159664 0.5823529 2.28
35    2     0 cut     RCG   45  RCG0.5    0  238  0.71 41.15667 0.644570 0.002983193 0.4176471 1.70
36    2     2 cut     RCG   37  RCG2.1    2  182  0.48 45.09000 0.461009 0.002637363 0.3692308 1.06
37    2     2 cut     RCG   37  RCG2.3    2  182  0.84 44.78750 1.095394 0.004615385 0.6461538 1.90
38    2     2 cut     RCG   37  RCG2.4    2  182  0.66 44.92500 0.844105 0.003626374 0.5076923 1.46
39    2     2 cut     RCG   37  RCG2.5    2  182  0.61 45.00250 0.486282 0.003351648 0.4692308 1.36
40    2     5 cut     RCG   44  RCG5.2    5  231  0.52 43.78714 0.682854 0.002251082 0.3151515 1.22
41    2     5 cut     RCG   44  RCG5.3    5  231  0.76 44.75429 1.399784 0.003290043 0.4606061 1.72
42    2     5 cut     RCG   44  RCG5.4    5  231  0.52 43.85286 0.727006 0.002251082 0.3151515 1.21
43    2     5 cut     RCG   44  RCG5.5    5  231  0.43 42.87429 0.672898 0.001861472 0.2606061 1.07

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

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地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-