My research suggests that when an LMER/GLMER fails to converge due to a too-large deviance gradient...
Model failed to converge with max|grad| = 0.00297196 (tol = 0.001, component 1)
- You should be worried.
- Everything possible should be done to examine the data for problems and question your assumptions (i.e., get to the root of the problem), as outlined here.
- As somewhat of a last resort, you can check the relative gradient, which has been updated here (since the changelog entry linked above) to include the Choleski Factorization e.g.,
relgrad <- with(model@optinfo$derivs,solve(chol(Hessian),gradient)) max(abs(relgrad))
Assuming you have done a lot of work at step 2, switching to a relative gradient to solve this problem still seems post-hoc if it is motivated by convergence failure under the
I'm looking for any advice or citations you can provide that describe the conditions that could a priori motivate the calculation and use of a relative gradient as above.
With some more digging, I found that the proposal to include a relative gradient as above was not incorporated into
lme4 and instead a help page
?convergence was included that suggests to use many optimizers and compare the result, which is great, but it doesn't address my main question:
Are there circumstances where it is acceptable to calculate the relative gradient as above, or, is this approach outdated/ill-advised?
Second, (and if the relative gradient is useful) when the relative gradient and the
max|grad| results diverge, what clues might this provide to resolve the issue on the data side?