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;








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?










share|cite|improve this question









$endgroup$


















    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?










    share|cite|improve this question









    $endgroup$














      1












      1








      1


      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?










      share|cite|improve this question









      $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






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked May 25 at 8:19









      nimbus3000nimbus3000

      1376




      1376




















          2 Answers
          2






          active

          oldest

          votes


















          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.






          share|cite|improve this answer









          $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.






          share|cite|improve this answer









          $endgroup$













            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
            );



            );













            draft saved

            draft discarded


















            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









            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.






            share|cite|improve this answer









            $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
















            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.






            share|cite|improve this answer









            $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














            3












            3








            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.






            share|cite|improve this answer









            $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.







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            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

















            • $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














            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.






            share|cite|improve this answer









            $endgroup$

















              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.






              share|cite|improve this answer









              $endgroup$















                0












                0








                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.






                share|cite|improve this answer









                $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.







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered May 25 at 10:13









                James PhillipsJames Phillips

                560257




                560257



























                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

                    What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

                    Esgonzo ibérico Índice Descrición Distribución Hábitat Ameazas Notas Véxase tamén "Acerca dos nomes dos anfibios e réptiles galegos""Chalcides bedriagai"Chalcides bedriagai en Carrascal, L. M. Salvador, A. (Eds). Enciclopedia virtual de los vertebrados españoles. Museo Nacional de Ciencias Naturales, Madrid. España.Fotos