Re: NONMEM ODE solver
My comments are attached.
On Sun, 27 May 2007 18:53:21 +0200, "Benjamin Ribba"
<[EMAIL PROTECTED]> said:
> Dear NMusers,
>
> 1. I have some difficulties to find information on the ODE solver
> implemented in NONMEM.
> Can anyone tell me about the numerical integrator(s) implemented when
> using
> ADVAN6 (recommended for non-stiff) and ADVAN8 (stiff problems)? In
> particular, is the integrator able to switch automatically between stiff
> and
> non-stiff resolution techniques?
>
> 2. Then, still related to the ODE solver, I was also interested in a
> message
> I¹ve picked up from the archive (from Mark Sale, posted January 2005, see
> below), for which I couldn¹t find any answer from the group. Additional
> information on these items would be greatly appreciated.
> _______________________________________________________
>
> From: [EMAIL PROTECTED]
> Subject: [NMusers] questions on ODE solver errors
> Date: Wed, January 26, 2005 4:40 pm
>
> If the NOABORT option is used for the ODE solvers, and the
> ODE solver has "numerical difficulties", giving the message:
>
> NUMERICAL DIFFICULTIES WITH INTEGRATION ROUTINE.
> MAXIMUM NO. OF EVALUATIONS OF DIFFERENTIAL EQUATIONS, 100000, EXCEEDED.
> 0END OF PRED EXIT CODE MESSAGES FROM THE ESTIMATION STEP
>
> But, NONMEM continues to plod along.
> Does anyone know what NONMEM does instead? I assume that the OBJ
> contribution for that subject cannot be calculated, so, the gradient
> for the dimension(s) requiring that OBJ cannot be calculated. Seems
> like an error to simply ignore the OBJ contribution from that person
> (resulting in a lower OBJ for that function evaluation, and a bad
> gradient and Hessian). Is that function evaluation discarded, and
> no gradient is generated for that dimension/iteration? But I don't
> see a 0 gradient anywhere in the output (I know, in NONMEM V, it
> isn't as simple as one function evaluation per dimension (+1))
>
> Thanks
>
>
> Mark Sale M.D.
> Global Director, Research Modeling and Simulation
> GlaxoSmithKline
> 919-483-1808
> Mobile
> 919-522-6668
> _______________________________________________________
>
>
> Thanks for your help in this matter.
>
> Benjamin Ribba
>
> Therapeutic Targeting in Oncology (EA3738)
> University Claude Bernard Lyon 1
> Faculty of Medicine Lyon-Sud
> 165, chemin du grand revoyet
> 69921 Oullins cedex
>
> Tel: +33 4 26 23 59 57 / +33 6 66 06 15 21
>
>
>
--
Alison Boeckmann
[EMAIL PROTECTED]
All emails to this topic have been appropriate. I can add a few
comments.
(1) By default, with ADVAN9, MF=21 (if there are no etas) or MF=22 (if
there are etas). The significance of these values can be read in the
comments in the ODEPACK routine LSODI1. By default, with ADVAN8,
METH=2 and MITER=2. Again, the significance is documented in the
comments in the IMSL routine DGEAR. Stuart Beal made a choice of the
METH/MITER values a long time ago based on these comments and neither
of us experimented with other choices. Routines from IMSL and ODEPACK
are to some extent black boxes to me. Stuart may have studied their
code when he designed the ADVAN routines. I never did.
(2) The user has some control over the methods used by LSODI (with
ADVAN9) and DGEAR (with ADVAN8). See the help/html entries for PRCOMG.
I am almost 100% certain that no one has ever actually attempted to use
non-default values of METH or MITER.
(3) Why were there no comments in these routines till NONMEM VI?
Actually, the commented versions were distributed with NONMEM III, in
1992. The organization of the distribution media (mag tape and
floppies) was very different then from what it is today, there was less
code, and there was room for commented code. Starting with NONMEM IV,
the organization was changed (in part, to accommodate the SETUP and
SETUP.BAT utilities, which were new), and the code grew. In order to
fit the code on the floppies, we (Stuart and I) decided to strip the
comments. Was this a good decision? I don't know. With NONMEM VI and
the use of CDROM as the (sole) distribution medium, there is plenty of
room for comments, and Tom Ludden and I decided to include them, if
only so that you users could attempt to answer questions such as the
current topic without the help of the original developers.
(4) Re: The PREDPP error message
NUMERICAL DIFFICULTIES WITH INTEGRATION ROUTINE.
MAXIMUM NO. OF EVALUATIONS OF DIFFERENTIAL EQUATIONS, 100000, EXCEEDED.
This message was not originally part of ADVANs 6 or 8 or 9. However,
someone sent us at least one problem in which the integrating routine
drove the step size to nearly 0, and the ADVAN routine got into a
seemingly infinite loop. With NONMEM IV, the ADVANs were changed to
count the number of calls to DES, and abort if it exceeded the above
arbitrarily chosen limit. IMAX was added to PRCOMG to allow the user
to supply a larger limit using verbatim code, as shown in the example
in the help entry. I am certain that this feature has been used, to
good effect. The value of 100000 is probably too small, especially with
modern fast computers.
(5) What does NONMEM do if the above error return occurs from PREDPP?
If you do not use NOABORT option, then NONMEM quits. If NOABORT is
present, then NONMEM attempts theta-recovery or eta-recovery. (see
Guide V, chapter 12). As I recall, Stuart told me that NONMEM in
effect puts a "spike", i.e., "infinity", in the objective function
during the search procedure, for the eta and/or theta values that gave
rise to the error condition. NONMEM tries other values for eta (for
this subject, if doing conditional estimation), or other values for
theta (for all subjects, if not conditional estimation). If it cannot
find any values of eta and/or theta for which it can avoid the error
condition, then it quits with a message from NONMEM. I think (but am
not certain) that this would be a message such as
MINIMIZATION TERMINATED DUE TO PROXIMITY OF NEXT ITERATION EST. TO A
VALUE AT WHICH THE OBJ. FUNC. IS INFINITE
If with NOABORT you see only a few error messages in file PRDERR, early
in the estimation step, then you need not worry - a few unrealistic
values of theta and/or eta were avoided. But if there are many, and
they are still showing up near the end of the search, then NONMEM may
have been hampered in the search because it was constrained to avoid
what might have been an important area of search space. What Mark
conjectured ("I assume that the OBJ contribution for that subject
cannot be calculated, so, the gradient for the dimension(s) requiring
that OBJ cannot be calculated") is not true. NONMEM always includes
every subject's and every observation's contribution to the objective
function. If it cannot, then it aborts.