Go to the GraphPad home page. Buy online now for instant delivery!

  GraphPad Home Support Quick Answers Database

R2 of weighted nonlinear fits.   FAQ# 1355
  

When you fit a model to data with nonlinear regression, it is often useful to weight the data. This is most often done when the amount of variation is proportional to the Y value, so there is more scatter with large values. 

Prism performs weighted nonlinear regression. But it doesn't report a weighed R2. Instead, until Prism 5.02 and 5.0b,  it reports the unweighted R2 for the fit determined by weighted nonlinear regression (and labels it 'unweighted'). 

Why? In versions 1-4 of Prism, the weighted nonlinear regression was weighted by the Y values of the data. With this scheme, a weighted R2 would make no sense.  With Prism 5, we switched to weighting by the Y values of the curve (and adjusting those weights as the nonlinear regression progresses). With weighting by the Y values of the curve, it makes perfect sense to compute a weighted R2, but we didn't realize this when we created Prism 5, so Prism 5.00 and 5.01 and 5.0a continued to report the unweighted R2.

Prism 5.02 and Prism 5.0b calculate the R2 of a weighted fit as detailed below:

  1. Fit the model using relative (1/Y2) or Poisson (1/Y) weighting to compute the weighted sum-of-squares (wSSmodel)
  2. Fit the data to a horizontal line model (Y=Mean + )*X) using the same weighting to compute the weighted sum-of-squares (wSShorizontal). 
  3. The weighted R2 is:

                1.0 - (wSSmodel/wSShorizontal)

Notes:

  • This method will only work with Prism 5, as Prism 4 and earlier did the weighting differently
  • This method will work with weighting by 1/Y or 1/Y2, but not the other weighting methods (which would result in different weights for different points in the horizontal fit case). 
* * * * *
Copyright 2002 - 2009, GraphPad Software Inc. All rights reserved.

Please email us comments and corrections.