curvefit.com. Guide to nonlinear regression.Try our software free for 30 days.StatMate leads you step by step through power and sample size calculations.InStat is a less cumbersome alternative to typical heavy-duty statistical programs. With InStat, even a statistical novice can analyze data in just a few minutes.Prism is a powerful combination of basic biostatistics, curve fitting and scientific graphing in one comprehensive program.GraphPad Software. Data analysis and biostatistics resources.


spa

Table of contents
Intro to regression
Nonlinear regression


s

Introduction
Choices
You must pick model
Classic models
How to derive
Sum-of-squares
Weighting
How nonlin works
Curve fitting with Prism
Interpreting the results
Comparing two curves
Distributions of best-fit values
Radioligand binding
Saturation binding
Competitive binding
Kinetics of binding
Dose-response curves
Enzyme kinetics
Standard curves
More information
Search curvefit.com

curvefit.com was created by GraphPad Software, Inc. Send comments or questions to the author of these pages, Dr. Harvey Motulsky, president of GraphPad Software.

In April 2003, GraphPad released Prism 4 and published Fitting Models to Biological Data using Linear and Nonlinear Regression. This book includes all the information that comprises curvefit.com, and much more. You can read this book as a pdf file.



Choices to make when fitting data with nonlinear regression

No matter what program you use for nonlinear regression, you need to follow these steps.

Step 1. Choose a model

Nonlinear regression fits a model to your data. You must, therefore, choose a model. With most programs (including GraphPad Prism) this model must be expressed as a mathematical function. With some programs you can express the model as a set of differential equations or as a compartment diagram of boxes and arrows. See Classic equations commonly used by biologists and How models are derived. Also see Why a computer program cannot pick a model for you. With some programs (including Prism) you can write an equation in a manner that lets you have different models for different portions of your data.

Step 2. Choose (or review) initial values

Nonlinear regression is an iterative procedure. The program must start with estimated values for each variable that are in the right "ball park" - say within a factor of five of the actual value. It then adjusts these initial values to improve the fit.  See How nonlinear regression works.

Some programs (including GraphPad Prism) provide initial values automatically. With Prism, initial values are entirely automatic if you use a built-in equation. If you enter your own equation, you can also enter rules for initial values. For example the initial value of one parameter may be twice the maximum Y value in the data, while the initial value of another parameter may equal the average of the highest and lowest X values. Once you define these rules, Prism will compute appropriate initial values based on the range of your data. See Initial values with Prism.

You'll find it easy to estimate initial values if you have looked at a graph of the data, understand the model, and understand the meaning of all the parameters in the equation. Remember that you just need an estimate. It doesn't have to be very accurate. If you are having problems estimating initial values, set aside your data and simulate curves using the model. Change the variables one at a time, and see how they influence the shape of the curve. Once you have a better feel for how the parameters influence the curve, you might find it easier to estimate initial values.

When fitting a simple model to clean data, it won't matter much if the initial values are fairly far from the correct values. You'll get the same best-fit curve no matter what initial values you use, unless the initial values are extremely far from correct. Initial values matter more when your data have a lot of scatter or your model has many variables.

Step 3. Decide whether to constrain any parameters

When performing nonlinear regression, you don't have to fit each parameter in the equation. Instead, you may fix one or more of the parameters to constant values. It is often helpful to define constants when you have only a few data points. For example, you might fix the bottom plateau of a sigmoid curve or exponential decay to zero.

Remember that nonlinear regression programs have no "common sense". You need to think about how you did the experiment, and decide whether some of the parameters should be fixed. For example, if a background signal has already been subtracted, it makes sense to fix the bottom plateau of a dose-response curve or an exponential decay curve to zero.  

Some programs let you constrain parameters to a certain range of values. Prism lets you do this in an indirect manner.

Step 4. Decide on a weighting scheme

Nonlinear regression programs generally weight each point equally. But there are many ways to differentially weight the points. See Weighting methods.  

Step 5. Decide how to handle replicate values (if any)

If you collected replicate Y values at every value of X, there are two ways Prism can fit a model to the data. It can treat each replicate as a separate point, or average the replicate Y values, and treat the mean as a single point.

You should consider each replicate a separate point when the replicates are independent. Two examples:

   You are doing a radioligand binding experiment. All the data were obtained from one tissue preparation and each replicate was determined from a separate incubation (separate test tube). The sources of experimental error are the same for each tube. If one value happens to be a bit high, there is no reason to expect the other replicates to be high as well. The errors are independent.
   You are doing an electrophysiology study. You apply a voltage across a cell membrane and measure conductance. Each data point was obtained from a separate cell. The possible sources of experimental error are independent for each cell. If one cell happens to have a high conductance, there is no reason to expect the replicate cells (those that you apply the same voltage to) to also have high conductance.
Average the replicates and treat the mean as a single value when the replicates are not independent. Two examples:
   You performed a binding experiment with a single tube at each concentration, but assessed the radioactivity in each tube three times. Those three values are not independent.  Any experimental error while conducting the experiment would affect all the replicates.
You performed a dose-response experiment, using a different animal at each dose with triplicate measurements. The three measurements are not independent. If one animal happens to respond more than the others, that will affect all the replicates. The replicates are not independent.

Step 6. Choose other options

Most programs offer a variety of choices about how the calculations are performed. For example, see Method options with Prism and Output options with Prism

Why a computer program cannot pick a model for you                                                                                                                                                                                                                                                                                                           

All contents copyright © 1999 by GraphPad Software, Inc. All rights reserved.