I am using the
glmer function from the
lme4 package in R, and I'm using the
bobyqa optimizer (i.e. the default in my case). I am getting a warning, and I'm curious what it means.
Warning message: In optwrap(optimizer, devfun, start, rho$lower, control = control, : convergence code 3 from bobyqa: bobyqa -- a trust region step failed to reduce q
I searched "a trust region step failed to reduce q." Found some information in the minqa package, which said "Consult Powell for explanation." I did (you can too, if you want! see the references and links to them below), but I fail to understand. In fact, I failed to find anything about reducing q.
M. J. D. Powell (2007) "Developments of NEWUOA for unconstrained minimization without derivatives", Cambridge University, Department of Applied Mathematics and Theoretical Physics, Numerical Analysis Group, Report NA2007/05, http://www.damtp.cam.ac.uk/user/na/NA_papers/NA2007_05.pdf.
M. J. D. Powell (2009), "The BOBYQA algorithm for bound constrained optimization without derivatives", Report No. DAMTP 2009/NA06, Centre for Mathematical Sciences, University of Cambridge, UK. http://www.damtp.cam.ac.uk/user/na/NA_papers/NA2009_06.pdf.
P.s. I know I can change the optimizer, and I will to see if I can get output without warnings or errors. I will also check the gradient and Hessian if I can, as per a comment/answer by Ben Bolker. I'm using
MuMIn and I'm not sure if Ben's answer will work without some additional tinkering, but I'll work on it once my computer finishes what it's doing, anyway, I digress.
As per Dr. Bolker's comment below, I began looking through the FORTRAN code (Here is the code for anyone interested in looking but not downloading it). "430" appears in the bobyqb.f portion of the code. Simply search for "430" or "reduce Q" to find the relevant code.
This is my first encounter with FORTRAN code, but I think the code says that if the following conditions are met, produce the warning:
NTRITS > 0,
VQUAD >= 0,
IPRINT > 0. "The integer NTRITS is set to the number "trust region" iterations that have occurred since the last "alternative" iteration."
VQUAD appears several times, and I'm not yet clear on it's significance as its value seems to be dependent on a variety of other variables, the values of which sometimes depend on other variables.From bobyqa.f: "The value of IPRINT should be set to 0, 1, 2 or 3, which controls the amount of printing. Specifically, there is no output if IPRINT=0 and there is output only at the return if IPRINT=1.".
So, it seems the task is to figure out the significance of
VQUAD being >= 0 and, perhaps, understanding how / when
IPRINT became > 0. I'll have to go back to the paper to have a look, but the math, or at least its symbolic expression, is a bit of a barrier for me. Unless, someone knows about the algorithm or has the desire to learn about it, I think I'll have to iteratively increase my understanding of the warning by going back and forth between the papers, the code, and the internet until I understand what it means.