File Exchange

image thumbnail

Five parameters logistic regression - There and back again

version 2.0.0.0 (23.4 KB) by Giuseppe Cardillo
Fit data points with a five points logistic regression or interpolate data.

9 Downloads

Updated 29 Mar 2018

View Version History

GitHub view license on GitHub

Five parameters logistic regression
One big holes into MatLab cftool function is the absence of Logistic Functions. In particular, The Five Parameters Logistic Regression or 5PL nonlinear regression model is commonly used for curve-fitting analysis in bioassays or immunoassays such as ELISA, RIA, IRMA or dose-response curves. The standard dose-response curve is sometimes called the five-parameter logistic equation. It is characterized by it’s classic “S” or sigmoidal shape that fits the bottom and top plateaus of the curve, the EC50, and the slope factor (Hill's slope). This curve is symmetrical around its inflection point. To extend the model to handle curves that are not symmetrical, the 5PL equation adds an additional parameter, which quantifies the asymmetry. The 5PL equation is:
F(x) = D+(A-D)/((1+(x/C)^B)^E)
where:
A = Minimum asymptote. In a bioassay where you have a standard curve, this can be thought of as the response value at 0 standard concentration.
B = Hill's slope. The Hill's slope refers to the steepness of the curve. It could either be positive or negative.

C = Inflection point. The inflection point is defined as the point on the curve where the curvature changes direction or signs. C is the concentration of analyte where y=(D-A)/2.

D = Maximum asymptote. In an bioassay where you have a standard curve, this can be thought of as the response value for infinite standard concentration.

E = Asymmetry factor. When E=1 we have a symmetrical curve around inflection point and so we have a four-parameters logistic equation.

In this submission there are 2 functions: L5P - to find the 5 parameters and to fit your data (as calibrators...); L5Pinv - to interpolate data of unknown samples onto calibrators curve.

Enjoy!

Created by Giuseppe Cardillo
giuseppe.cardillo-edta@poste.it

To cite this file, this would be an appropriate format: Cardillo G. (2012) Five parameters logistic regression - There and back again http://www.mathworks.com/matlabcentral/fileexchange/38043

Cite As

Giuseppe Cardillo (2020). Five parameters logistic regression - There and back again (https://github.com/dnafinder/logistic5), GitHub. Retrieved .

Comments and Ratings (8)

Hey! Do you have an example of how to run this function?

I have this error:
Attempt to execute SCRIPT varargin as a function:
C:\Program Files\MATLAB\R2019a\toolbox\matlab\lang\varargin.m

Thanks!

Sam Tia

Thanks for sharing this great code. One observation I made is that in order for this function to work, the x-matrix needs to be ordered in ascending or descending order. For example [1 2 5 6 8] or [8 6 5 2 1]. When I input a non-ordered array - for example, [1 5 8 2 6] - the function did not work even if the y-matrix was arranged in the same order.

Bin Miao

Thanks a lot!

Bin Miao

Giuseppe Cardillo

a very useful comment...

orca

非常感謝Giuseppe Cardillo老師大公無私的分享,使得我們這些後進有機會得以學習提高。
只是有一個地方不太明了,輸入Giuseppe Cardillo老師在注釋中給出的例子里的數據,調用函數擬合得出的結果,與例子中給出的擬合結果不符,不知是何原因。

Giuseppe Cardillo

this is not true!
if you look well at code:

slope=(y(end)-y(1))/(x(end)-x(1));

and so slope can be positive or negative.

Moreover, in the starting points vector:

st_=[min(y) sign(slope) x(Idx) max(y) 1];

sign(slope) is -1 or +1.

So your comment is completely wrong!

precuneus

The code mostly assumes a positive slope (e.g. the automatic selection of starting values).

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!