Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Re: problem with NonlinearFit

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4788] Re: problem with NonlinearFit
  • From: rubin at msu.edu (Paul A. Rubin)
  • Date: Mon, 16 Sep 1996 23:51:17 -0400
  • Organization: Michigan State University
  • Sender: owner-wri-mathgroup at wolfram.com

In article <508n6c$com at dragonfly.wolfram.com>,
   "Brian O'NEILL" <oneill at iiasa.ac.at> wrote:
->
->I am having the following problem with the NonlinearFit function, and 
would
->appreciate any tips you might have. (I have appended sample Mathematica 
code
->below.)
->
->My goal is to fit a non-monotically decreasing time series with a
->monotonically decreasing function (specifically, a sum of decaying
->exponenitials plus a constant).  I am approaching the problem by using
->NonlinearFit and specifying a general functional form, then attempting to
->constrain the search to non-negative coefficients and non-positive
->exponents.  However, in general I have run into the following problems:
->
->(1) NonlinearFit will accept parameter specifications of the form {x,xo}, 
or
->of the form {x,minx,maxx}, but not of the form {x,xo,xmin,xmax}.  This 
means
->I can constrain the variables, but I can't start from different points to
->test robustness.
->
->(2)The routine stops when it tries to search outside the constraints 
instead
->of continuing the search in a different direction, so that it is 
important
->to be able to specify different initial values to look elsewhere.
->
[remainder edited out]

a.  I think you've hit on a bug in NonlinearFit, or more precisely a 
discrepancy between the documentation in the "Guide to Standard Mma 
Packages" and the actual function (at least according to what 
??NonlinearFit returns).

b.  This is tacky, but it might function as a workaround:  replace a1, a2, 
a3, tau1, tau2, tau3 with a1^2, a2^2, ... and then don't constrain a1, ..., 
tau3.  Presumably you can fiddle with starting values, then.

c.  WAY BACK WHEN I was a grad student (in math), I worked for a prof once 
who was interested in a technique called "exponential peeling" for fitting 
precisely this kind of function (sum of decaying exponentials) to data.  
I've forgotten the details, but I think it was a successive approximation 
scheme, which started by assuming that for large values of t the term with 
the smallest decay rate would dominate; so you estimated that term out in 
the tail, subtracted it from the data, recursed at it until you'd estimated 
all the terms, then started over (or something like that - it has been a 
while).  If that method hasn't been discredited in the last century or so, 
you might want to look it up.

-- Paul

**************************************************************************
* Paul A. Rubin                                  Phone: (517) 432-3509   *
* Department of Management                       Fax:   (517) 432-1111   *
* Eli Broad Graduate School of Management        Net:   RUBIN at MSU.EDU    *
* Michigan State University                                              *
* East Lansing, MI  48824-1122  (USA)                                    *
**************************************************************************
Mathematicians are like Frenchmen:  whenever you say something to them,
they translate it into their own language, and at once it is something
entirely different.                                    J. W. v. GOETHE

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: r^2 for non linear fits
  • Next by Date: Help - transposing equation
  • Previous by thread: Re: problem with NonlinearFit
  • Next by thread: random number generators