Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Constrain independent variable in FindFit?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95379] Constrain independent variable in FindFit?
  • From: mickelsp at rice.edu
  • Date: Sat, 17 Jan 2009 05:28:10 -0500 (EST)

Hello.

I am trying to fit two sets of data (two different quantities, both as 
a function of time), whose models share common parameters, in a manner 
similar to this MathGroup post:
http://forums.wolfram.com/mathgroup/archive/2008/Jan/msg00155.html

I am using the FindFit commmand, and I already successfully specify 
initial values of the input parameters (I can also constrain them, but 
am not doing so currently).  However, my model is ill-behaved for 
early times, and the error from the early times outside my range of 
interest prevents convergence to good parameter values.  To avoid the 
ill-behaved time values and achieve convergence, I would like to limit 
the search for the fit to a particular range of times (say, t0 to t1). 
  Is it possible to constrain the range of independent variable values 
for the FindFit function's search?

My FindFit function looks something like this:
FindFit[newdat, {err[t]}, {{Gamma, 1}, {N0, 2*10^6}}, t],
where 'newdat' and 'err[t]' are basically as they are in the 
aforementioned post except that 'newdat' begins at t=t0 instead of t=0 =

and 'err[t]' has been weighted by the uncertainties in my data.

I've already looked through Mathematica's documentation and through 
MathGroup archives without much return.  Hopefully someone can provide 
guidance.  Thanks.
--
Pascal


Pascal Mickelson
mickelsp at rice.edu


  • Prev by Date: Weird self-fixing problem with cell styles
  • Next by Date: RE: Intermediate computational results
  • Previous by thread: Re: Weird self-fixing problem with cell styles
  • Next by thread: Re: Constrain independent variable in FindFit?