Skip to main content
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
Show menu

Nonlinear regression worked example: 4-parameter logistic model


In this example we will fit a 4-parameter logistic model to the following data:

Nonlinear regression worked example - data

The equation for the 4-parameter logistic model is as follows:

4-parameter logistic model - equation

which can be written as:

F(x) = d+(a-d)/(1+(x/c)^b)


4-parameter logistic model - graph

Scatter diagram

First we look at the scatter diagram with Response as dependent variable Y and Dose as independent variable X. In the scatter diagram, we want to plot a LOESS smoothed trendline. We complete the dialog box as follows:

Nonlinear regression worked example - scatter diagram dialog box

This results in the following scatter diagram:

Nonlinear regression worked example - scatter diagram

From this graph we will be able to estimate initial values for the parameters of the 4-parameter logistic model (see below).

Nonlinear regression

First we enter the regression equation d+(a-d)/(1+(x/c)^b) (we don't need to enter the 'y=' part) and select Response as dependent variable Y and Dose as independent variable X:

Nonlinear regression worked example - dialog box

We leave the default values for Convergence tolerance and for Maximum number of iterations unchanged. We select the options to display a scatter diagram with fitted line and the residuals plot.

Initial parameters

We click Get parameters from equation and MedCalc extracts the parameter names from the equation: d, a, c and b:

Nonlinear regression worked example - Get parameters from equation

We now need to enter initial values or best guesses for the different parameters. The scatter diagram above is useful for finding the following estimates:

We can enter these numbers in the corresponding input fields:

Nonlinear regression worked example - Initial parameter values

Some helpful functions

MedCalc provides some useful functions which can provide a general solution for establishing initial parameter values:

We can enter these formulae in the corresponding input fields:

Nonlinear regression worked example - Initial parameter values

We are now ready to proceed and click OK.


To find the model's parameters, MedCalc uses the Levenberg-Marquardt iterative procedure (Press et al., 2007), which yields the following results:

Nonlinear regression worked example - results

The result tables show that the procedures stopped after 72 iterations because the Convergence criterion was met, i.e. the software could not obtain a further reduction of the Residual standard deviation.

Next the initial parameters are listed: the formulae VMAX(&Y), VMIN(&Y), VAVERAGE(&X) and VSLOPE(&X,&Y) yielded the values 24.2, 0.1, 15.6778 and 0.5116 for d, a, c and b respectively, quite close to our own estimates based on the inspection of the scatter diagram, which were 25, 0, 18,and 0.5.

The program reports the sample size and the Residual standard deviation, followed with the regression equation and the calculated values of the regression parameters.

The inflection point c, for example, is estimated to be 19.3494 with Standard Error 0.5107 and 95% Confidence Interval 18.0365 to 20.6623.

The F-test that follows the Analysis of variance table shows a P-value of less than 0.0001. The F-test is an approximate test for the overall fit of the regression equation (Glantz & Slinker, 2001). A low P-value is an indication of a good fit.

Scatter diagram & fitted line

This graph displays a scatter diagram and the fitted nonlinear regression line, which shows that the fitted line corresponds well with the observed data:

Nonlinear regression worked example - graph

Residuals plot

Our residuals plot does not show any outliers in the data and do not show a certain pattern. The residual plot therefore does not indicate a problem with our model.

Nonlinear regression worked example - residuals plot


See also

External links

Recommended book

Book cover

Primer of Applied Regression & Analysis of Variance.
Glantz, Stanton, Slinker, Bryan

Buy from Amazon

Primer of Applied Regression & Analysis of Variance is a textbook especially created for medical, public health, and social and environmental science students who need applied (not theoretical) training in the use of statistical methods. The book has been acclaimed for its user-friendly style that makes complicated material understandable to readers who do not have an extensive math background. The text is packed with learning aids that include chapter-ending summaries and end-of-chapter problems that quickly assess mastery of the material. Examples from biological and health sciences are included to clarify and illustrate key points. The techniques discussed apply to a wide range of disciplines, including social and behavioral science as well as health and life sciences. Typical courses that would use this text include those that cover multiple linear regression and ANOVA.