MathGroup Archive 2002

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

Search the Archive

Re: Fitting problem: Linear vs Nonlinear

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38502] Re: Fitting problem: Linear vs Nonlinear
  • From: Bill Rowe <listuser at earthlink.net>
  • Date: Fri, 20 Dec 2002 04:27:33 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On 12/18/02 at 1:53 AM, guillerm at usal.es wrote:

>(*I have the function that follow that is known*)

>f[t_]= 0.3 Exp[-0.13 t]- 0.2 Exp[-0.5 t];

>(*I have the model*)

>y[a_,t_]:= a f[t]+ Random[Real, {-0.01, 0.01}]

>(*With this model are simultated a few experimental data*)

>sample=Table[{t, y[5,t]}, {t, 0,10}];

>(* I wish estimated  "a" ,that I suposse that is unknown, fitting 
>"sample" If I apply the package NonlinearFit it works but I receive
>the message: try using Regress from the "Statistics`LinearRegression`"
>package*)

Your model is linear with respect to a, the unknown parameter. You will definitely get better, more stable results using Regress from the LinearRegression package than using NonlinearRegress for linear problems. In fact if you aren't interested in the various diagnostics Regress provides, the built in function Fit is probably the optimum choice.

Try Fit[sample, {Exp[-.5 t], Exp[-.013 t]},t] or Fit[sample, {0.3 Exp[-.5 t], -0.2 Exp[-.013 t]},t]


  • Prev by Date: Re: portable issues with zip files
  • Next by Date: RE: FullSimplify failure
  • Previous by thread: Fitting problem: Linear vs Nonlinear
  • Next by thread: Re: Fitting problem: Linear vs Nonlinear