MathGroup Archive 2008

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

Search the Archive

Re: Global Fitting multiple equations to

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84649] Re: Global Fitting multiple equations to
  • From: Michael Parker Latham <Michael.Latham at Colorado.EDU>
  • Date: Tue, 8 Jan 2008 01:30:46 -0500 (EST)

Hi Daniel,
Thanks for your reply.  I understand your suggestion to get the variables out by fitting/minimizing a target error function.  Seeing as I am a newbie at this, do you have any suggestions on how exactly this would be done.
Thanks,
Mike

Michael Latham
Graduate Student
Department of Chemistry and Biochemistry
University of Colorado, Boulder
Phone: 303-492-8085
Fax: 303-492-2439


---- Original message ----
>Date: Mon, 07 Jan 2008 13:12:15 +0100
>From: dh <dh at metrohm.ch>  Hi
>Subject: Re: Global Fitting multiple equations to multiple  
>To: Michael Parker Latham <Michael.Latham at Colorado.EDU>
>
>Hi Michael,
>you want to fit a vector valued function but FindFit can only deal with 
>scalar valued functions. Well, all you have to do is to help FindFit a 
>bit. If we consider the norm of the error we have a scalar function that 
>we may fit to the zero function.
>Say we have data yi[tj] where yi are the vector components and tj the 
>discrete time. Further yic[t] is the theortical expression for the 
>component i. Then
>err=Sum( (yic[tj]-yi[tj])^2 ) where the sum is over i and j
>is the norm square of the error (you may even take another norm).
>You may now fit err againste the data: {{t1,0},{t2,0}...} to get the 
>parameters.
>hope this helps, Daniel
>
>Michael Parker Latham wrote:
>> Hi,
>> I have collected a time dependent data set.  At each time point there is four observables (IntDiagBo, IntDiagFr, IntCrossFrBo and IntCrossBoFr) which can be described by four equations (ibb, iff, ifb, ibf).  These four equations are related and depend on six variables (ib, if, rb, rf, kbf, kfb).  I would like to globally fit the four data sets to the four equations to extract the six variable.  What I have done so far is below
>> 
>> In[1]:= << "NonlinearRegression`"
>> 
>> Setup Equations
>> 
>> In[2]:= a11 = rb + kbf;
>> a12 = -kfb;
>> a21 = -kbf;
>> a22 = rf + kfb;
>> \[Lambda]1 = 1/2*((a11 + a22) + Sqrt[(a11 - a22)^2 + 4*kfb*kbf]);
>> \[Lambda]2 = 1/2*((a11 + a22) - Sqrt[(a11 - a22)^2 + 4*kfb*kbf]);
>> 
>> Diagonal Peaks Equations
>> 
>> In[8]:= ibb = ib*((\[Lambda]1 - a11) Exp[-\[Lambda]2*x1] - (\[Lambda]2 - a11) 
>>        Exp[-\[Lambda]1*x1])/(\[Lambda]1 - \[Lambda]2);
>> iff = if*((\[Lambda]1 - a22) Exp[-\[Lambda]2*x1] - (\[Lambda]2 - a22) 
>>        Exp[-\[Lambda]1*x1])/(\[Lambda]1 - \[Lambda]2);
>> 
>> Cross Peaks Equations
>> 
>> In[10]:= ibf = ib*(a21*Exp[-\[Lambda]1*x1] - 
>>       a21*Exp[-\[Lambda]2*x1])/(\[Lambda]1 - \[Lambda]2);
>> ifb = if*(a12*Exp[-\[Lambda]1*x1] - 
>>       a12*Exp[-\[Lambda]2*x1])/(\[Lambda]1 - \[Lambda]2);
>> 
>> Data for 1 set of peaks
>> 
>> In[12]:= IntDiagBo = {{0.01938, 5111831}, {0.03673, 3996563}, {0.03673, 4073294}, {0.05409, 3057033}, {0.07144, 2487152}, {0.08879, 1967903}, {0.10615, 1588128}, {0.10615, 1500203}, {0.1235, 1222629} , {0.14086, 1046551}};
>> IntDiagFr = {{0.01938 , 13757210}, {0.03673, 11098630}, {0.03673, 11044150}, {0.05409, 9100536}, {0.07144, 7166819}, {0.08879, 6045878}, {0.10615, 4976833}, {0.10615, 5150198}, {0.1235, 4106922}, {0.14086, 3583284}};
>> IntCrossFrBo = {{0.01938, 418536.5}, {0.03673, 607315.1}, {0.03673, 647085.9}, {0.05409, 663520.1}, {0.07144, 653818.1}, {0.08879, 643523.8}, {0.10615, 577511.9}, {0.10615, 647762.6}, {0.1235, 626453.3}, {0.14086, 564194.7}};
>> IntCrossBoFr = {{0.01938, 450925.1}, {0.03673, 623400.1}, {0.03673, 719430.4}, {0.05409, 782262.1}, {0.07144, 796733.9}, {0.08879, 730650.5}, {0.10615, 709815.9}, {0.10615, 707971.9}, {0.1235, 754398.6}, {0.14086, 645057.8}};
>> 
>> Restrain Exchange Rates with Kd
>> 
>> In[28]:= 0.002 == kfb/kbf;
>> 
>> I can use FindFit to fit each data set to its respective equation, but I would like to globally, simultaneously fit the four equations to the four data sets to get "better" values for the six variables.
>> 
>> Any help with this would be greatly appreciated.  Please let me know if there is any other information that can be supplied.
>> Thanks in advance,
>> Mike
>> 
>> 
>> Michael Latham
>> Graduate Student
>> Department of Chemistry and Biochemistry
>> University of Colorado, Boulder
>> Phone: 303-492-8085
>> Fax: 303-492-2439
>> 
>


  • Prev by Date: Re: Give a list of options in Mathematica 6
  • Next by Date: Re: Re: Locator 3D
  • Previous by thread: Re: nontrivial solution of Euler-beam problem?
  • Next by thread: Re: Global Fitting multiple equations to