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


s

Welcome
Linear vs. nonlinear
Avoid linearizing
Linear regression
Linear with nonlin
Other regressions
Other curve fits
Nonlinear regression
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.



Fitting linear data with nonlinear regression

Note: This section is more advanced, and will only be useful after you have used nonlinear regression programs.

Using nonlinear regression to access options

Nonlinear regression is more versatile than linear regression.  Since nonlinear regression can fit data to any model, even a linear one, you may find it useful occasionally to use a nonlinear regression analysis to analyze linear data. This lets you take advantage of the increased flexibility of many nonlinear regression programs. For example, you could use the nonlinear regression analysis to compare an unconstrained linear regression line with one forced through the origin (or some other point). Or you could fit a linear regression line, but weight the points to minimize the sum of the relative distance squared, rather than the distance squared.

Determining a point other than the Y intercept

The linear regression equation defines Y as a function of slope and Y intercept:

MathType Equation

This equation can be rewritten in a more general form, where we replace the intercept (Y value at X=0) with YX' , the Y value at X', where X' is some specified X value. Now the linear regression equation becomes:

MathType Equation

Y at any particular X value equals the Y value at X'  plus the slope times the distance from X to X'. If you set X' to zero, this equation becomes identical to the previous one.

This equation has three variables, YX' , X', and slope. If you set either X' or YX' to a constant value, you can fit the other (and the slope).

When you fit these equations using nonlinear regression, Prism insists that you enter rules for initial values (or directly enter initial values). Since the equation is in fact linear, Prism will find the best-fit values no matter what initial values you enter. Setting all initial values to zero should work fine.

Note. When you enter your equation, you must define either X' or YX'. The two are related, so it is impossible to fit both.

Example 1. You want to find the X value (with SE and confidence interval) where Y=50 for linear data. Fit the data using nonlinear regression using this equation to determine the best-fit values of the slope and X50.

Y = 50 + slope*(X-X50)

In this equation, X50 is the value of X where Y=50. Don't confuse this with  an EC50, which is the value of X where Y is halfway between minimum and maximum in a dose-response curve. A linear model does not have a minimum and maximum, so the concept of EC50 does not apply.

Example 2. You want to fit data to a straight line to determine the slope and the Y value at X=20. Fit the data using nonlinear regression to this equation.

Y = Y20 + slope*(X-20)

Example 3.  You want to determine the slope and the X intercept, with SE and confidence interval. Fit the data using nonlinear regression to this equation:

Y = slope*(X-Xintercept)

Fitting two line segments

Nonlinear regression can fit two line segments to different portions of the data, so that the two meet at a defined X value. See Example 3. Two linear regression segments that meet at the breakpoint.

Fitting straight lines to semi-log graphs

You can start linear (or nonlinear) regression from a data table, results table or graph. Prism then fits a model to the data. If you start from a graph, Prism fits to the data plotted on that graph. Selecting a logarithmic axis (from the Axis dialog) does not change the data, so does not change the way Prism performs regression. If you plot a linear regression "line" on a graph with a logarithmic axis, the best-fit "line" will be curved. To fit a straight line on a semilog plot requires use of nonlinear regression.

If the Y-axis is logarithmic use this equation.

Y=10^(Slope*X + Yintercept)

Graphing on a log Y-axis is equivalent to taking the antilog. The antilog of the right side of the equation is the equation for a straight line:  slope*X + Yintercept. So this equation appears linear when graphed on a logarithmic Y-axis. It is difficult to define rules for initial values that work for all data sets, so you'll need to enter initial values individually for each data set. Here is an example.

 

If the X-axis is logarithmic, then use this equation:

Y = Slope*10^X + Yintercept

If both axes are logarithmic (rare) then use this equation:

Y = 10^(Slope*10^X + Yintercept)

Other kinds of regression


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