The maths in expfitbm


The drift model

y(t) = a + b t + c exp[-d t]

has the disadvantage that the minimum finder of

sumt (Yt - y(t))2

can get stuck on negative values of d.
So that we use a mapping of d assuring an ever decreasing exponential:

d -> arctan(d) + π/2

See C:\hgs\Mathematica\ExpFit-ImprovedEq.nb

Fortran code in ~/tap/p/expfits.f and  ~/tap/mo/expfitbm.f

Calculation of the uncertainty of the parameters:
  1. Compute the RMS of the best fit: RMSb
  2. Compute the 95% width of the χ2 distribution: r
  3. For what value of  pj  is  RMS = r*RMSb ?
(Carried out with bisection)
NB: The residual is almost certainly not white!