R-Squared for a non linear curveLinear-logarithmic Regression in MATLAB with two input arguments - which model to assume?Why does matlab show r squared for non-linearDifference between non-linear curve fitting and interpolationOptions for quantifying changes in the functional form of a response curveFinding the non-linear curve that minimize the (sum of squared) distance to a set of pointCurve fitting - linear vs non-linearBetter way to fit/model data with high & low density areas (and with a geometric fit?)Optimal parametrization in nonlinear least squaresAlgorithms, models, recommendations for regression with vector outputFitting curve to non-decreasing data
Is using 'echo' to display attacker-controlled data on the terminal dangerous?
Does the new finding on "reversing a quantum jump mid-flight" rule out any interpretations of QM?
A map of non-pathological topology?
Is it safe to change the harddrive power feature so that it never turns off?
Do you have to have figures when playing D&D?
Is it possible to fly backward if you have really strong headwind?
Why can my keyboard only digest 6 keypresses at a time?
If a Variant Human is Reincarnated, would they lose the feat and skill proficiency they started with?
Should I refuse to be named as co-author of a low quality paper?
What is the color of artificial intelligence?
2019 gold coins to share
Why is long-term living in Almost-Earth causing severe health problems?
bash vs. zsh: What are the practical differences?
If there's something that implicates the president why is there then a national security issue? (John Dowd)
Why does this query, missing a FROM clause, not error out?
What would prevent chimeras from reproducing with each other?
What STL algorithm can determine if exactly one item in a container satisfies a predicate?
Shouldn't Apple consider allowing use of Apple Pencil while it's charging?
Live action TV show where High school Kids go into the virtual world and have to clear levels
How do free-speech protections in the United States apply in public to corporate misrepresentations?
Can we completely replace inheritance using strategy pattern and dependency injection?
What aircraft was used as Air Force One for the flight between Southampton and Shannon?
I have a problematic assistant manager, but I can't fire him
How can I make 12 tone and atonal melodies sound interesting?
R-Squared for a non linear curve
Linear-logarithmic Regression in MATLAB with two input arguments - which model to assume?Why does matlab show r squared for non-linearDifference between non-linear curve fitting and interpolationOptions for quantifying changes in the functional form of a response curveFinding the non-linear curve that minimize the (sum of squared) distance to a set of pointCurve fitting - linear vs non-linearBetter way to fit/model data with high & low density areas (and with a geometric fit?)Optimal parametrization in nonlinear least squaresAlgorithms, models, recommendations for regression with vector outputFitting curve to non-decreasing data
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$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?
curve-fitting
$endgroup$
add a comment |
$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?
curve-fitting
$endgroup$
add a comment |
$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?
curve-fitting
$endgroup$
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?
curve-fitting
curve-fitting
asked May 25 at 8:19
nimbus3000nimbus3000
1376
1376
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$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
add a comment |
$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$
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "65"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f410037%2fr-squared-for-a-non-linear-curve%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$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
add a comment |
$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
add a comment |
$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$
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.
answered May 25 at 8:36
Kane ChuaKane Chua
752
752
$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
add a comment |
$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
$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
$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
add a comment |
$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$
add a comment |
$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$
add a comment |
$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$
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.
answered May 25 at 10:13
James PhillipsJames Phillips
560257
560257
add a comment |
add a comment |
Thanks for contributing an answer to Cross Validated!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f410037%2fr-squared-for-a-non-linear-curve%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown