MathGroup Archive 2001

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

Search the Archive

Re: Exponential fit question.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28033] Re: Exponential fit question.
  • From: "Ian McInnes" <ian at whisper-wood.demon.co.uk>
  • Date: Wed, 28 Mar 2001 02:41:08 -0500 (EST)
  • References: <99pdg6$lft@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

It does not appear to be possible to fit a model of the form a*Exp[b*x]
using Fit - when specifying Exp[x] as the function, the model a*Exp[x] is
used.
The fit should minimise the sum of squared deviations from fitting the
model. This is about 54685 using the Excel result (which I believe should be
7.5*Exp[0.034*x]); that using the simpler model from Fit is 520017 (it
appears to yield close to zero for each point except the last one, to which
it fits amost exactly). There is clearly no mileage in using this model.

However, there is a function NonlinearFit in the Statistics`NonlinearFit`
package that should fit the required model, i.e.:
        NonlinearFit[data, a*Exp[b*x], x, {a, b}]
should find values of the parameters a and b, using the independent variable
x. Unfortunately the result produced by this using the default method is
also garbage. This does work on other data I have tried which fit the model
closely, but it does not seem to like your data (which nonetheless appears
to be reasonable for the model).
However, specifying Method->Gradient to NonlinearFit gives the following
model:
      26.6113*Exp[0.0234948*x]
which gives a closer fit than that from Excel with a sum of squared
deviations of 22062. Other methods again give garbage.

Overall, fitting this exponential model to data which do not give a close
correspondence to it appears to be something of a hit and miss affair.
However, given the lack of diagnosis, I can't help thinking that this is one
for support at wolfram.com -although of course one always analyze the results
of the fit.

Regards,

Ian.

"joe" <joe at wam.umd.edu> wrote in message news:99pdg6$lft at smc.vnet.net...
> hello.
>
> I was wondering if someone could help me with the following problem.
>
> I am trying to perform an exponential fit to the following data
> {{x,y}}
>
> data
> ={{50,22},{64,62},{78,122},{93,269},{107,414},{122,507},{136,597}}
>
> Fit[data,Exp[x],x]
>
> what I get is
>
> 1.94272422061017735^-63 *E^x Which is not correct.
>
> With Excel I get 7.5*E^0.0034x which is correct.
>
> How can I do this with Mathematica ?
>
> Thanks.
> -Joseph.
>
>




  • Prev by Date: Re: t distribution
  • Next by Date: Re: Exponential fit question.
  • Previous by thread: Re: Exponential fit question.
  • Next by thread: Re: Exponential fit question.