Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

truncated_nbinom1 error in eigen(h) #941

Open
VetDoc23 opened this issue Sep 20, 2023 · 4 comments
Open

truncated_nbinom1 error in eigen(h) #941

VetDoc23 opened this issue Sep 20, 2023 · 4 comments

Comments

@VetDoc23
Copy link

Hi there,

I am trying to fit a model to my data using:

glmmTMB(preMDS ~ 1 + relevel(as.factor(F_Absetzen), ref = "0") + (1 | Betrieb),
data = data,
family = "truncated_nbinom1")

But then I get this error:
"Error in eigen(h): infinite or missing values in 'x'
In addition: Warning messages:
1: In (function (start, objective, gradient = NULL, hessian = NULL, :
NA/NaN function evaluation
2: In (function (start, objective, gradient = NULL, hessian = NULL, :
NA/NaN function evaluation
[...]
8: In (function (start, objective, gradient = NULL, hessian = NULL, :
NA/NaN function evaluation
9: In (function (start, objective, gradient = NULL, hessian = NULL, :
NA/NaN function evaluation"

This occurs only with "F_Absetzen" and another factor from my data. With the other factors from my dataset I don't have any problems. I also tried other families (poisson, nbinom2, truncated_nbinom2) and they are working without any problem.

Do you know what could cause the problem? Could it still be my data, even if the other distributions are working?

I am happy about any suggestions!
Thank you!

@bbolker
Copy link
Contributor

bbolker commented Sep 20, 2023

Is there any chance you can send a reproducible example?

@VetDoc23
Copy link
Author

Thank you for your fast response! Yes, of course: This is a subset of my data and I still get the same error with the same two columns mentioned.
df_glmmTMB.csv

This is my version information: glmmTMB v1.1.7

version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
status
major 4
minor 2.1
year 2022
month 06
day 23
svn rev 82513
language R
version.string R version 4.2.1 (2022-06-23 ucrt)
nickname Funny-Looking Kid

I'm still new to R and this topic in general. So I hope I didn't overlook anything obvious.
Pleas tell me, if you need further information.

@bbolker
Copy link
Contributor

bbolker commented Sep 21, 2023

I can see where this is running into trouble. I will see what I can do to fix it/get past this spot. In any case, it's not terribly surprising that this runs into trouble because it's a small noisy data set that might not match the specified model very well ...

@bbolker bbolker mentioned this issue Sep 23, 2023
@bbolker
Copy link
Contributor

bbolker commented Sep 25, 2023

Working on this here (should work OK, still fussing with side issues)

remotes::install_github("glmmTMB/glmmTMB/glmmTMB@try_jacobian")

and retry your example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants