MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Numeric overflow



Paul.Hanson@colorado.edu wrote:
> 
> Hello, again!  A big thanks to the helpers out there.  Here's a spin off
> of  previous question.  I have data set that is a series of nested x,y
> values, {{x,y},{x1,y1}} that I'm attempting to fit using the
> NonlinearFit function.  What I have written is:
> 
> lamda =(NonlinearFit[newlist[[#]],c+ b Exp[-a x],{x},{a,b,c}]&)/@
>     Table[i,{i,1,10}]
> 
> where I'm applying NonlinearFit to several sets of data using the Map
> function (written in full form here).  I've got the function specified
> along with the variables I'm trying to fit.  When I run the line, I get
> 
> NonlinearFit::"lmovfl":
>     "Warning: numeric overflow occurred during this search.  This may
> mean \ that the search is starting from an inappropriate point, that
> the model is \ unstable, or that insufficient precision is being used
> for these \ calculations. The returned parameter estimates may not
> minimize the sum of \ squares."
> 
> and no output.  What am I missing - besides a six-pack, that is?  Have a
> great weekend!
> 
> Paul Hanson
> 
> --
>                                  * *
>                                 *    *
>                            /\    */\*
>                           /  \   /  \ /\

Well, the error message has three things you could try.

1) If you have an approximate idea what the coefficients are or at least
know that they are always positive or less than three or something like
that, then NonlinearFit has ways to specify the range of the
parameters(second paragraph from the bottom on page 462 of the guide to
standard addons".  As with all fitting routines, the closer you are to
the fit when you start, the better.
2) a simple exponential doesn't sound like it would be unstable. 3)
Increase the precision by using the WorkingPrecision, PrecisionGoal and
AccuracyGoal options.

Before doing anything rash, plot out the solution over the data.  Does
it look like a good fit?  If so, don't worry.  If there was a real
problem, you wouldn't even get in the same county as the data.  A
warning message is sometimes just that-a warning. -- 
Remove the _nospam_ in the return address to respond.



  • Prev by Date: RE: Re: Rotate3D bug solution
  • Next by Date: user's query in comp.soft-sys.math.matheamtica (fwd)
  • Prev by thread: Numeric overflow
  • Next by thread: dot product and inner product?