![]() |
spa |
|
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:
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:
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.
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.
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:
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.
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:
If both axes are logarithmic (rare) then use this equation:
|
| All contents copyright © 1999 by GraphPad Software, Inc. All rights reserved. |