5

I am using the glmmTMB library to run mixed models, within a R markdown document. Any model that I run, I get these warnings:

'giveCsparse' has been deprecated; setting 'repr = "T"' for you'giveCsparse' has been deprecated; setting 'repr = "T"' for you'giveCsparse' has been deprecated; setting 'repr = "T"' for you

Then, if I run the code in the console, I get these warnings:

Warning messages:
1: In Matrix::sparseMatrix(dims = c(0, 0), i = integer(0), j = integer(0),  :
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
2: In Matrix::sparseMatrix(dims = c(0, 0), i = integer(0), j = integer(0),  :
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
3: In Matrix::sparseMatrix(dims = c(0, 0), i = integer(0), j = integer(0),  :
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you

My code looks like this:

m1 <- glmmTMB(count~var1+var2+var3+(1|group), data = bd, family = "poisson")

I tried reinstalling TMB and glmmTMB with dependencies=TRUE, but the message keeps appearing. Apparently it doesn't affect the model at all, but whatever tests or graphs I do, I keep getting warnings. Is it possible to fix this? Or do I just ignore it?

MKie45
  • 87
  • 1
  • 6
  • I've updated the package repositories. Can someone on Windows or MacOS try `install.packages("glmmTMB", repos="https://glmmTMB.github.io/glmmTMB/repos")` and see if it resolves this problem (so I can edit #3 in my answer to take out the cautionary note) ? – Ben Bolker Apr 15 '21 at 01:33
  • I tried it with different mixed models. It works ok, the warning no longer appears. – MKie45 Apr 17 '21 at 15:00
  • great .......... – Ben Bolker Apr 17 '21 at 16:33

1 Answers1

10

It's harmless. You can:

  1. Install the latest version of glmmTMB (1.1.2 at present) from CRAN.
  2. ignore it
  3. use suppressWarnings() (at the possible cost of missing other relevant warnings!)
  4. install the development version from GitHub, where it was fixed in this commit. (The binary packages on the repository have also been updated now.)

or you could downgrade your version of Matrix to an older version (using remotes::install_version() or the snapshot package)

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453