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
Curve fitting with Prism
Interpreting the results
Comparing two curves


s
2 models, 1 dataset
1 model, 2 datasets
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.

Comparing fits to two sets of data (same equation)

You'll use a different approach to compare nonlinear regression curve fits depending on whether you are comparing curves from one experiment or pool the results of several experiments.

Compare best-fit values pooled from several experiments

The best way to compare best-fit values is to repeat the experiment several times, and then analyze the pooled data. The first step is to focus on what you really want to know. For dose-response curves, you may want to test whether the two EC50 values differ significantly, whether the maximum responses differ, or both.  With kinetic curves, you'll want to ask about differences in rate constants or maximum response. With other kinds of experiments, you may summarize the experiment in other ways, perhaps as the maximum response, the minimum response, the time to maximum, the slope of a linear regression line, etc. Or perhaps you want to integrate the entire curve and use area-under-the-curve as an overall measure of cumulative response.

Once you've summarized each curve as a single value, compare those values using a paired t test.

For example, below are the results of a binding study to determine receptor number (Bmax). The experiment was performed three times with control and treated cells side-by-side. Each value is a Bmax determined by nonlinear regression.

Experiment Control Treated
1 1234 987
2 1654 1324
3 1543 1160

Treat the Bmax values determined from nonlinear regression just as you'd treat any measurement, and compare the two groups with a t test. Because control and treated cells were treated side-by-side to control for experiment-to-experiment variability, analyze the data using a paired t test.

The two-tailed P value is 0.0150, so the effect of the treatment on reducing receptor number can be deemed "statistically significant". The 95% confidence interval of the decrease in receptor number ranges from 149.70 to 490.30 sites/cell.

These calculations were based only on the best-fit Bmax values, ignoring all the other results calculated by the curve-fitting program. You may be concerned that you are not making best use of the data, since the number of points and replicates do not appear to affect the calculations. But they do contribute indirectly. You'll get more accurate results if you use more concentrations of ligand in each experiment, so the results of the experiments will be more consistent. If there really are differences between control and treated curves, you'll get a higher t ratio and a lower P value if you use more concentrations.

If you have three or more treatment groups, use repeated measures one-way ANOVA rather than a paired t test.

Compare two best-fit values from one experiment

Even if you've done the experiment only once, you can compare the best-fit values of two groups using a t test. A t test compares a difference with the standard error of that difference. That standard error can come by pooling several experiments (as in the previous approach) or you can use the standard error reported by nonlinear regression. For example, here are the results of first experiment in Approach 1.

Best-fit Bmax SE df
Control 1234 98 14
Treated 987 79 14

Calculate the unpaired t test using this equation:

MathType Equation

The numerator is the difference between best-fit values. The denominator is an estimate of the standard error of that difference, computed as the square root of the sum of the squares of the two standard error values. This is a reasonable estimate if the number of data points in the two curves is equal, or nearly so. If the sample sizes are very different, don't rely on this calculation.

To determines the two-tailed P value from t, you need to know the number of degrees of freedom. Each fit in this example has 14 degrees of freedom (equal to the number of data points minus the number of variables fit). The t test in this example has 28 degrees of freedom, the sum of the degrees of freedom in each fit. Determine the P value using a program or the excel formula "=tdist(1.96,28,2)" . The two-tailed P value corresponding to t=1.96 and df=28 is 0.06. If there really were no difference between Bmax values, you'd see a difference this large or larger in 6% of experiments of this size. Using the conventional threshold of P=0.05, the difference between Bmax values in this example is not statistically significant.

The validity of this comparison depends on the assumptions of the t test. A key assumption is that the distribution of best-fit values (if you were to repeat the experiment many times) follows a Gaussian distribution. The next section discusses this assumption.

GraphPad Prism can compare these curves automatically. On the nonlinear regression dialog, check the option to use a t test to compare fits. In the results view (page) called Overview and comparison, Prism reports the comparison.

The Gaussian assumption and comparison of curves

The use of a t test to compare best-fit values (pooling several experiments or within one experiment) depends on the assumption that the distribution of best-fit values follows a Gaussian distribution. If you were to repeat the experiment many times, the distribution of the best-fit values must follow a Gaussian distribution. With linear regression, this assumption is sure to be valid if your data obey all the assumptions of the analysis. With nonlinear regression, the best-fit values may not be Gaussian, even if the data follow all the assumptions. The next chapter discusses this point in detail.

Compare entire curves using a F test

The method described in the previous section requires that you focus on one variable that you consider most relevant. If you don't wish to focus on one variable, compare entire curves using the following approach. You'll have to do some calculations manually, as this approach is not built-in to Prism.

First, use Prism to fit each data set to a model. Total the sum-of-squares and degrees of freedom from the two fits. If you are comparing a curve under control conditions with a curve after some treatment, then add the sum-of-squares from the best-fit of control data with the sum-of-squares of the best-fit for treated data. Do the same with the df. Since these values are obtained by fitting the control and treated data separately, label these values, SSseparate and DFseparate.  For our example, the sums-of-squares equal 1261 and 1496 so SSseparate equals 2757. Each experiment had 14 degrees of freedom, so DFseparate equals 28.

Now do some copying and pasting to combine the control and treated data set into one big data set on a new table. Simply append one data set under the other, and analyze the data as if all the values came from one experiment. Its ok that X values are repeated. Fit the same equation to this combined data set  Label the sum-of-squares from this fit SScombined and the number of degrees of freedom DFcombmined. For the example, SScombined is 3164 and DFcombmined is 30 (32 data points minus two variables fit by nonlinear regression).

You expect SSseparate to be smaller than SScombined even if the treatment had no effect simply because the separate curves have more degrees of freedom. The question is whether the difference between SS values is greater than you'd expect to see by chance. To find out, compute the F ratio using the equation below, and then determine the corresponding P value (there are DFcombined-DFseparate degrees of freedom in the numerator and DFseparate degrees of freedom in the denominator.

MathType Equation

For the above example, F=2.067 with 2 df in the numerator and 28 in the denominator. To find the P value, use GraphPad StatMate or type this formula into an empty cell in Excel =FDIST(2.06,2,28) . The P value is 0.1463.

The P value tests the null hypothesis that there is no difference between the control and treated curves overall, and any difference you observed is due to chance. If the P value were small, you would conclude that the two curves are different - that the experimental treatment altered the curve. Since this method compares the entire curve, it doesn't help you focus on which parameter(s) differ between control and treated (unless, of course, you only fit one variable).  It just tells you that the curves differ overall. In this example, the P value was fairly large, so we conclude that the treatment did not affect the curves in a statistically significant manner.

Comparing slopes and intercepts of linear regression

Zar details a special method to compare the slopes and intercepts of two regression lines in Chapter 18 of J Zar, Biostatistical Analysis, 2nd edition, Prentice-Hall, 1984.  You'll need to read Zar's book to do the calculations yourself, but the basic idea is straightforward. Compare the slopes first, testing the null hypothesis that the slopes are all identical (the lines are parallel). The P value answers this question: If the slopes really were identical, what is the chance that randomly selected data points would have slopes as different (or more different) than you observed. If the P value is less than 0.05, conclude that the lines are significantly different. In that case, there is no point in comparing the intercepts. The intersection point of two lines is:

If the P value for comparing slopes is greater than 0.05, conclude that the slopes are not significantly different. Now  calculate a single slope for both lines. Now the question is whether the lines are parallel or identical. Prism calculates a second P value testing the null hypothesis that the lines are identical. If this P value is low, conclude that the lines are not identical (they are distinct but parallel). If this second P value is high, there is no compelling evidence that the lines are different.

This method is equivalent to an Analysis of Covariance (ANCOVA), although ANCOVA can be extended to more complicated situations.  

GraphPad Prism uses this method to compare two linear regression lines.

Two-way ANOVA to compare curves, without a model

It is also possible to compare two curves, without fitting a model using two-way ANOVA. The two factors are treatment and whatever variable is coded by X (usually time or concentration). One of the P values from ANOVA tests the null hypothesis that treatment had no effect on the outcome Y. If this P value is small, you conclude that the treatment made a difference overall. You can compare Y values at each value of X, using post tests following two-way ANOVA.

 


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