KNOWLEDGEBASE - ARTICLE #1928

# R2 and nonlinear regression

• The value R2 quantifies goodness of fit.
• It is a fraction between 0.0 and 1.0, and has no units. Higher values indicate that the model fits the data better.
• When R2 equals 0.0, the best-fit curve fits the data no better than a horizontal line going through the mean of all Y values. In this case, knowing X does not help you predict Y.
• When R2=1.0, all points lie exactly on the curve with no scatter. If you know X you can calculate Y exactly.
• You can think of R2 as the fraction of the total variance of Y that is explained by the model (equation). With experimental data (and a sensible model) you will always obtain results between 0.0 and 1.0.
• There is really no general rule of thumb about what values of R2 are high, adequate or low. If you repeat an experiment many times, you will know what values of R2 to expect, and can investigate further when R2 is much lower (or higher) than the expected value.
• By tradition, statisticians use uppercase (R2) for the results of nonlinear and multiple regression and lowercase (r2) for the results of linear regression, but this is a distinction without a difference.

## Problems with R2 and nonlinear regression

• Use of R2 in nonlinear regression is not standard. In linear regression, the R2 compares the fits of the best fit regression line with a horizontal line (forcing the slope to be 0.0). The horizontal line is the simplest case of a regression line, so this makes sense. With most models used in nonlinear regression, the horizontal line is not a simple case and can't be generated at all from the model with any set of parameters. So comparing the fits of the chosen model with the fit of a horizontal line doesn't quite make sense. For this reason, Minitab does not  report R2 with nonlinear regression and SAS labels the value "Pseudo R2".
• The R2 value can be very high, yet the fit can be essentially useless if all the parameters have very wide confidence intervals. Read why
• With nonlinear regression, R2 can be negative. Really!
• Computing R2 when the points are unequally weighted is tricky, and there doesn't appear to be a standard method. Prism 6 uses a different (better) method than prior versions.
• R2 (and even the adjusted R2) should not be used to compare the fits of alternative models. Why?  Because models that fit very differently as assessed by AICc may have R2 values that differ only in the third to fifth digit after the decimal (1).

## Is R2 from nonlinear regression useful at all?

The people at Minitab think that R2 is not a useful value so don't report it with results of nonlinear regression.

GraphPad Prism does report the R2 (and adjusted R2 if you check an option in the Diagnostics tab). Why?  In my opinion, R2 is really is useful in only one way, as a reality check for evaluating repeated experiments. Say you repeat an experiment many times with some variations of course) so come to learn that R2 values alre always between 0.6 and 0.8. If one experiment gives instead R2 of 0.2, you should be suspicious and look carefully to see if something went wrong with the methods or reagents used in that particular experiment. And if a new employee brings you results showing R2 of 0.95 using that same system, you should look carefully at how many"outliers" were removed, and whether some data was made up.

1.    Spiess, A.-N. & Neumeyer, N. An evaluation of R2 as an inadequate measure for nonlinear models in pharmacological and biochemical research: a Monte Carlo approach. BMC Pharmacol 10, 6–6 (2010).

## Explore the Knowledgebase

Analyze, graph and present your scientific work easily with GraphPad Prism. No coding required.