# R^{2} and nonlinear regression

## Key points about R^{2}

- The value R
^{2}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 R
^{2}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 R
^{2}=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 R
^{2}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 R
^{2}are high, adequate or low. If you repeat an experiment many times, you will know what values of R^{2}to expect, and can investigate further when R^{2}is much lower (or higher) than the expected value. - By tradition, statisticians use uppercase (R
^{2}) for the results of nonlinear and multiple regression and lowercase (r^{2}) for the results of linear regression, but this is a distinction without a difference.

## Problems with R^{2} and nonlinear regression

- Use of R
^{2}in nonlinear regression is not standard. In linear regression, the R^{2}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 R^{2}with nonlinear regression and SAS labels the value "Pseudo R^{2}". - The R
^{2}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, R
^{2}can be negative. Really! - Computing R
^{2}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. - R
^{2}(and even the adjusted R^{2}) should not be used to compare the fits of alternative models. Why? Because models that fit very differently as assessed by AICc may have R^{2}values that differ only in the third to fifth digit after the decimal (1).

## Is R^{2} from nonlinear regression useful at all?

The people at Minitab think that R^{2} is not a useful value so don't report it with results of nonlinear regression.

GraphPad Prism does report the R^{2} (and adjusted R^{2} if you check an option in the Diagnostics tab). Why? In my opinion, R^{2} 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 R^{2} values alre always between 0.6 and 0.8. If one experiment gives instead R^{2} 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 R^{2} 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).