Maximum growth rate in a sigmoidal fit
rahulsrao
I have several hundred S-shaped curves that I can fit with the Sigmoidal fit function available in Igor. But from all of these fits, I would like to extract the maximum growth rate, that is the linear slope of the curve around the inflection point (xhalf). Is there an easy way to write a code to fit a curve with the Sigmoidal function and then extract the maximum growth rate?
Thanks
Rahul
1) Use the derivative of the function
base + max[1]/(1+exp(-(x-xhalf)/rate))
at the inflection point and calculate the slope therefrom: It should be max/(4*rate) if I made no mistake.
2) Use a standard line fit around the inflection point with a limited range. "/R=(x1,x2)". The values of xn might depend on the noise of the data. I would start with xhalf-rate/2 to xhalf+rate/2.
The first one is more elegant, the second one might give a better representation of the real maximum growth rate; depends on the quality of your data and your needs.
HJ
August 26, 2016 at 09:29 am - Permalink
Write the derivative of the sigmoidal function in an analytical form to return the value at position x. For example ...
...
return (value of derivative at position x)
end
Once you fit the functions and get the coefficients, plug them in to the above function at x = inflection point.
With some clever analysis, you could create an error propagation method to get a first-principled error value on your growth rate as well. It would use the sigma coefficients returned from the fit to the S curves.
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
August 26, 2016 at 09:55 am - Permalink
return c[1]/(4*c[3])
end
Note that I used an Igor 7 style for the input parameter declaration.
Since you have "several hundred" you might want to look into the Batch Curve Fit package. To learn more, see the example experiment: File->Example Experiments->Curve Fitting->Batch Curve Fitting Demo. I believe the package has options for getting a wave with all the coefficients for all the fits to all your data sets. Apply that function to generate all the max slopes.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
August 26, 2016 at 10:08 am - Permalink
August 26, 2016 at 10:09 am - Permalink