1
$\begingroup$

At the start, please forgive me if my question is too elementary.

I am fitting a non-linear curve. Say a parabola. The data points I have are close to a parabola and the best output I get is a parabola. I want to quantify the quality if fit. Something like an R-Squared metric. I was wondering if the R-Squared metric, like in the case of a linear OLS, makes sense since one of the inputs for R-squared is the average of the input values, which I'm not sure makes sense for a parabola.

Can someone please help?

$\endgroup$
3
$\begingroup$

OLS quadratic model: $y = \beta_0 + \beta_1 X + \beta_2 X^2$

Your model is still a linear function of the unknown parameters $\beta$ with the features $X$ and $X^2$. Hence $R^2$ is still applicable.

$\endgroup$
  • $\begingroup$ The equation "y = B0 + B1 * sin(x) + B2 * log(x)" is linear in the coefficients and can be fit using linear algebra just as can be done with quadratic polynomials. Would you consider R-squared applicable in this case? Both this example equation and a quadratic polynomial can also be fit using non-linear regression, in both of those cases would R-squared be applicable? My understanding is yes for these questions. $\endgroup$ – James Phillips May 25 at 15:52
0
$\begingroup$

I calculate R-squared (R2) as "R2 = 1.0 - (regression_error_variance / dependent_data_variance)" and use it to tell me the fraction of the dependent data variance that is explained by the regression model. For non-linear equations this is both approximate and useful. For example if the R-squared value from an exponential regression is 0.75, I interpret this as meaning that the fitted equation explains 75 percent of the dependent data variance. In the case of your parabola example, the model is not a straight line and so the R-squared value is also both approximate and useful. My understanding is that R-squared is only exact for straight lines.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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