I am encountering convergence problems with some models after updating to lme4 1.1-20 that I did not encounter with earlier versions of lme4 (in particular, lme4 1.1-15). I am encountering these new convergence issues for some, but not all models, but the models with convergence issues are generally simple models. Therefore I do not understand why they are not converging.
Here is an example:
Dataset:
library(data.table)
d <- as.data.frame(
fread("curl http://www.intensivelongitudinal.com/ch4/ch4R.zip | tar -xf- --to-stdout *time.csv")
)
Model:
library(lme4)
fit <- lmer(intimacy ~ time * treatment + (time | id), data = d)
This throws a warning, which reads:
Model failed to converge with max|grad| = 0.00398684 (tol = 0.002, component 1)
This model previously converged without issue when using lme4 1.1-15. In addition, it is able to converge when using a rescaled version of the time
variable (time01
in the dataset, which changes the range from 0 to 1 instead of 1 to 15).
Any insight into what lme4 1.1-20 is doing differently?
Thanks.
Session Info:
R version 3.5.2 (2018-12-20)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lme4_1.1-20 Matrix_1.2-15 data.table_1.12.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 lattice_0.20-38 digest_0.6.18 MASS_7.3-51.1 grid_3.5.2 nlme_3.1-137
[7] evaluate_0.13 minqa_1.2.4 nloptr_1.2.1 rmarkdown_1.12 splines_3.5.2 tools_3.5.2
[13] xfun_0.5 yaml_2.2.0 compiler_3.5.2 htmltools_0.3.6 knitr_1.22