Please enable JavaScript to view this site.

This guide is for an old version of Prism. Browse the latest version or update Prism

Navigation: PRINCIPLES OF REGRESSION > How nonlinear regression works

Nonlinear regression with unequal weights

Scroll Prev Top Next More

How Prism implements weighting

Prism 5 and 6 weight by the Y value of the curve. Prism 4 and earlier weighted by the Y value of the data. The distinction is subtle and rarely matters much, but our simulations show that the results are sometimes more accurate when weights are based on the value of the curve rather than the data.

The situation is a bit tricky. The goal is to adjust the values of the parameters to minimize the weighted sum-of-squares. But the values of the weights depend on the values of those parameters. Here is how Prism 6 resolves this issue:

1.Perform the first iteration without any weights. If the initial parameter values are not very accurate, weighted regression can cause problems on the first iteration. This step was introduced in Prism 5.02 and 5.0b. Without it, some fits with bad initial values simply won't converge.

2.Compute Ycurve at all values of X based on the curve generated by this first iteration of nonlinear regression, and use those values to compute weights for each points.

3.Keeping those weights constant, use nonlinear regression to minimize the weighted sum-of-squares.

4.Recompute Ycurve based on the results of that curve fit and generate a new set of weights.

5.Keeping those new weights constant, use nonlinear regression again to minimize the weighted sum-of-squares.

6.Repeat steps 4 and 5 until the weighted sum-of-squares no longer changes.

Weighting with robust regression or automatic outlier removal

As we explain in reference 1, it doesn't make sense to perform robust regression using unequal weights. The problem is that outliers can get too much weight.

If you choose both unequal weighting and robust fitting, therefore, Prism does the fitting assuming equal weights. However it uses your weighting choice when creating a table of residuals, and when counting the number of outliers (a choice you can make in the preferences tab).

If you choose both unequal weighting and automatic outlier removal, Prism first fits using robust regression (ignoring your weighting choice), and then uses the weighting factors in identifying the outliers, as explained in reference 1.

Reference

1.Motulsky HM and Brown RE, Detecting outliers when fitting data with nonlinear regression – a new method based on robust nonlinear regression and the false discovery rate, BMC Bioinformatics 2006, 7:123. Download as pdf.

© 1995-2019 GraphPad Software, LLC. All rights reserved.