Closed XiangyunHuang closed 10 months ago
Quitting from lines 615-619 [unnamed-chunk-44] (hierarchical-normal-models.qmd)
Error in `fitTMB()`:
! negative log-likelihood is NaN at starting parameter values
Backtrace:
1. glmmTMB::glmmTMB(...)
2. glmmTMB::fitTMB(TMBStruc)
Execution halted
Error: Process completed with exit code 1.
在 Matrix 更新后,TMB 和 glmmTMB 最好从源码重新安装或等二者更新后从 CRAN 安装。特别是 Matrix 包发布重大版本更新后,TMB 和 glmmTMB 必须更新,否则,结果会出问题。
Error in validObject(.Object) :
invalid class “dsparseModelMatrix” object: superclass "xMatrix" not defined in the environment of the object's class
*** inla.core.safe: inla.program has crashed: rerun to get better initial values. try=1/1
Error in validObject(.Object) :
invalid class “dsparseModelMatrix” object: superclass "xMatrix" not defined in the environment of the object's class
Error in inla.core.safe(formula = formula, family = family, contrasts = contrasts, :
*** Failed to get good enough initial values. Maybe it is due to something else.
原因是 INLA 23.9.9 与新版 Matrix 1.6.2 不兼容(Matrix 1.6.2 发布很多更新),需要等待新版 Matrix 或 INLA 发布之后,再看。
安装 Matrix 旧版本 1.6.-1.1 可以暂时解决此问题
目前的开发版 Matrix 1.6-3 和 INLA 23.11.12 也不行,报错如下
Error in validObject(.Object) :
invalid class “dsparseModelMatrix” object: superclass "xMatrix" not defined in the environment of the object's class
只有回滚 Matrix 版本或重装 MatrixModels 才行,原因是 https://github.com/hrue/r-inla/issues/85