Error in fitTMB(TMBStruc) : negative log-likelihood is NaN at starting parameter values

3.7k views Asked by At

I have some data on Drosophila developmental time. I'm running it against treatment with vial specified as a random effect, as described below:

model_tddVZ <- glmmTMB(age ~ treatment + (1|vial), tddcVZ)

However, I encountered the following error message:

Error in fitTMB(TMBStruc) : negative log-likelihood is NaN at starting parameter values

I tried changing from R version 4.3.2 to 4.2.2, yet the problem remains. Can you shed some light on the issue?

My OS is Windows 10 Pro.

I did try changing the R version and reinstalling the packages.

1

There are 1 answers

3
sleepy On

This appears to be a problem relating to the recent changes to the package Matrix. See here for details.

I was encountering the same problems as you with models that were previously working, and when I tried to run them in lme4 I also got some unusual error and failure to run (this error, also on SO with related discussion).

I was able to resolve the errors for both lme4 and glmmTMB by reinstalling Matrix from the source (v 1.6-2). I suspect that will work for you too.