| Author |
Topic  |
|
|
lgentile
Canada
Posts |
Posted - 03/01/2005 : 12:22:54 PM
|
| I have a data set that seems to show a summation of two sigmoid functions. How do I write this script and how do i properly intialize parameters |
|
|
lgentile
Canada
Posts |
Posted - 03/01/2005 : 1:34:31 PM
|
to be exact. i need a sum of 2 boltzmanns with 2 max values, 1 min value, 2 50%values and 2 rates, i.e.e Amax1, Amax2, Amin, x0_1, x0_2, dx_1, dx_2, idealy a free fit to all. That way if the values can be fit with one boltzmann, the second one would equal zero.
i.e.
f=Bolt1 + 0
if fit with both Boltz...
f=Bolt1+Bolt2
can anybody help me out.
Thanks.
LG |
 |
|
|
easwar
USA
1965 Posts |
Posted - 03/01/2005 : 1:59:36 PM
|
Hi LG,
You can define a new user-defined function in NLSF such as below: 1> Set the user-defined parameters check box and specify the parameters as: Amax1, Amax2, Amin, x0_1, x0_2, dx_1, dx_2 2> In the function edit box, paste this equation: y=boltzmann(x,Amin,Amax1,x0_1,dx_1)+boltzmann(x,Amin,Amax2,x0_2,dx_2) 3>Uncheck the "Use Origin C" checkbox (in versions 7 and later) 4> Change the Form drop-down to Y-Script
Basically this is then setting up an equation which is a sum of two boltzmann, where the built-in boltzmann function is used twice.
However, this does not guarantee that if your data needs only one Boltzmann, then the second Boltzmann parameters will be zero. The minimization process will not know to do this and could end up fitting data that needs only one Boltzmann with a combination of two.
You may need to do the following: 1> fit with one Boltzmann and get the chi-sq and other parameters that describe the quality of the fit 2> fit with this equation with two Boltzmann and see what the quality of the fit is 3> decide based on the two results as to which one is the right model
You can look at the following free download in our file exchange area: http://www.originlab.com/FileExchange/details.aspx?C=5&cid=2&fid=64 and perhaps use that with the one-boltzmann (built-in) function and the two-botzmann function defined above to make the comparison of fit results to select the right model.
Easwar OriginLab
|
 |
|
|
lgentile
Canada
Posts |
Posted - 03/01/2005 : 2:16:50 PM
|
Hi Easwar,
i tried it but i can't find the "Use Origin C" checkbox (I am using origin 7), and when I try to fit it says i did not properly initialize the parameters.
what do i do now?
thanks.
LG |
 |
|
|
easwar
USA
1965 Posts |
Posted - 03/01/2005 : 2:21:33 PM
|
Hi LG,
The "Use Origin C" check box was added in a service relase for 7.0 (if I remember correctly) and so you may not see it if you have 7.0SR0.
In any case, just make sure you are using Y-Script to use this equation.
As for parameter initialization, no initialization will be done since this is a new function and does not have any associated initialization code (unless you write your own initialization code). So you will need to start off the fit with some initial hard coded guess values for your paramters and then let the iteration process take it from there.
If you need further help, I suggest you contact tech support with your data and refer to this post in your e-mail to them.
Easwar OriginLab
|
 |
|
|
lgentile
Canada
Posts |
Posted - 03/01/2005 : 3:20:55 PM
|
thanks for the help Easwar.
It works great!
Cheers,
LG |
 |
|
| |
Topic  |
|
|
|