1
$\begingroup$

Inspired by the comments here https://stackoverflow.com/questions/27288483/python-multiple-curve-fitting-models

In matlab, why is the R squared value displayed if it is meaningless for non-linear equations?

Is there a different use for it than those comments suggest?

This is the comment:

R.sq is meaningless for non-linear models. For linear models, R.sq is the fraction of variability explained by the model. For non-linear models this is not the case. Within a family (say, polynomials), models with more parameters will always produce larger R.sq, so this metric is useless to assess goodness of fit

$\endgroup$

1 Answer 1

2
$\begingroup$

$R^2$ is a good measure of explained variance in both linear and nonlinear models. It has its issues, such as not being between 0 and 1, but it's still useful.

A minor problem can arise in evaluating the fit of the regression in that the familiar measure, $R^2 = 1 − \frac{\sum_{i=1}^ne^2_i}{\sum_{i=1}^n(y_i-\bar{y})^2}$ , (7-17) is no longer guaranteed to be in the range of 0 to 1. It does, however, provide a useful descriptive measure.

Greene,William H., Econometric analysis, 7th ed., 2012

$\endgroup$
2
  • 1
    $\begingroup$ In fitting very nonlinear models, such as those with strange attractors, I can even think of an example where optimizing $R^2$ was the objective function. Courtney Brown, Serpents in the Sand, 1995. I believe it's the ecology and policy section, but I can't recall precisely. $\endgroup$
    – Sycorax
    Dec 10, 2014 at 2:14
  • $\begingroup$ $R^2$ works just fine in your example, as they've been optimizing the parameters, and not selecting the models. $\endgroup$
    – Aksakal
    Dec 10, 2014 at 2:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.