Re: [R] DLSODA error

From: Thomas Petzoldt <>
Date: Thu, 28 Apr 2011 23:30:47 +0200


your example is rather complex and somewhat time consuming even on fast computers, so it is not easy to track your problem down to its original reason.

However, what is clear to me is that this is definitely *not* not a problem of deSolve and most likely even not of optim, it is just a problem of your model specification. Your error messages point to a numerical problem:

DLSODA- Warning..Internal T (=R1) and H (=R2) are

       such that in the machine, T + H = T on the next step
      (H = step size). Solver will continue anyway.

In above, R1 = 0.2630651367072D+01 R2 = 0.2055665829864D-15

This is an internal message of the original lsoda Fortran code telling us that it cannot add H=0.2e-15 to to T=0.2e+01. Note that the relative numerical resolution of double precision arithmetic of the computer is about 1e-16.

To understand what I mean just try other ode methods, e.g.:

outmat <- ode(y = state, times = times,

   func = Kristian, parms = parameters, method="adams")

## or:

outmat <- ode(y = state, times = times,

   func = Kristian, parms = parameters, method="ode45")

Thomas P. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 28 Apr 2011 - 21:32:05 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 28 Apr 2011 - 22:10:35 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive