I have a large motor insurance dataset with which I want to make a mixed model regression to model the expected claim frequency using glmmTMB, with the purpose of determining an initial base premium.
My script looks like this:
glmmTMB(response ~ Var1 + Var2 + Var3 + ... +
offset(log(exposure_level) + (1|policy_id),
data = data,
family = nbinom1(link = "log"))
No matter what I do I get warnings regarding NaN and convergence and the p-value, std, z value, AIC, BIC, logLik and deviance in the summary are all NaN.
I get the following warnings:
Warning messages:
1: In .checkRankX(TMBStruc, control$rank_check) : fixed effects in conditional model are rank deficient
2: In (function (start, objective, gradient = NULL, hessian = NULL, : NA/NaN function evaluation
3: In (function (start, objective, gradient = NULL, hessian = NULL, : NA/NaN function evaluation
4: In fitTMB(TMBStruc) : Model convergence problem; non-positive-definite Hessian matrix. See vignette('troubleshooting')
5: In fitTMB(TMBStruc) : Model convergence problem; false convergence (8). See vignette('troubleshooting')
I have tried grouping the data more and leaving out variables, but it does not seem that I can fix the issues. No matter what I try the warnings and NaN still shows.
Has anyone experienced the same and know how to solve the problem?