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: [mg38485] Re: [mg38466] Fitting problem: Linear vs Nonlinear
  • From: "Johannes Ludsteck" <johannes.ludsteck at wiwi.uni-regensburg.de>
  • Date: Fri, 20 Dec 2002 04:24:29 -0500 (EST)
  • Organization: Universitaet Regensburg
  • Sender: owner-wri-mathgroup at wolfram.com

Dear Guillermo,
you obtained this message, since your model
is linear in a iff the parameters in f[t] are 
known. According to your specification all 
parameters except a are known.

To estimate a by linear regression, simply 
generate the data
ft = Table[f[t],{t,0,T,stepsize}]
and regress y = a ft.

Of course, if you want to estimate the parameters
of f[] too, you have to redefine f:
f[t,{c1,c2,c3,c4}]:= c1 Exp[c1 t] - c3 Exp[c4 t]
and request
NonlinearRegress[sample, a f[t,{c1,c2,c3,c4}],
{a,c1,c2,c3,c4}]

Best regards,
	Johannes Ludsteck

On 18 Dec 2002 at 1:53, 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*)
> 
> Needs["Statistics`NonlinearFit`"];
> 
> NonlinearRegress[sample,a f[t],{t},{a,5}]
> 
> (*How can I fit this data  using :*)
> 
> Needs["Statistics`LinearRegression`"]
> 
> Thanks
> 
> Guillermo
> 
> ---------------------------------------------
> This message was sent using Endymion MailMan.
> http://www.endymion.com/products/mailman/
> 
> 
> 


<><><><><><><><><><><><><><><><><><>
Johannes Ludsteck
Institut fuer Volkswirtschaftslehre
Lehrstuhl Prof. Dr. Moeller
Universitaet Regensburg
Universitaetsstrasse 31
93053 Regensburg
Tel +49/0941/943-2741



  • Prev by Date: in-kernel notebook manipulation problem
  • Next by Date: How to animate?
  • Previous by thread: Re: Fitting problem: Linear vs Nonlinear
  • Next by thread: Surface fitting question