0

If we select a model to our data of a kind other than linear i.e instead of the linear model y = ax + b we use y = ax^2 + bx + c

And use the same standard process of finding coefficients (least squares) should we be able to predict the best parameters a, b and c ?

In the section for Linear Regression in Wikipedia, in the Example section, they actually do this, but do not call it non-linear regression, so I wonder this:

  • Can we use least squares method from linear regression with non-linear models ?
  • Is the selection of a non linear model (like in the Wikipedia page) called non-linear regression or is it called something else?
  • Or what are they suggesting ?
Minsky
  • 135
  • 1
    Fitting y=ax^2+bx+c to data involves LINEAR regression because the equation is linear wrt the parameters a, b, c. doesn't matter if the function of the variable x is nonlinear. – JJacquelin Jun 23 '23 at 16:59
  • @JJacquelin That is why I marked this as a duplicate (though I am not thrilled to have the closure be automatic). // Minsky, does the link answer your question? – Dave Jun 23 '23 at 17:04
  • @Dave will this method be accurate for finding the coefficients a,b,c,d...in any polynomial then? – Minsky Jun 23 '23 at 17:12
  • There are legitimate concerns about numerical stability of solving for the OLS solution on a computer, but the math says that you get the exact right answer by following the usual calculation. I like the comment in the duplicate that the model just thinks the polynomial terms (squares, cubes, etc) are new variables and proceeds accordingly. – Dave Jun 23 '23 at 17:34
  • Interesting, however when I do this in libreoffice, I have to especify say X^2 as a new variable, like this y = ag + bx + c where x^2 is g, otherwise seems to get one of the x as parameters, or some strange thing. @Dave – Minsky Jun 23 '23 at 17:46
  • I cannot comment on the specifics on the software you are using. However, that almost seems like the point: you tell them model to consider some g variable, knowing that g equals x^2. – Dave Jun 23 '23 at 18:03
  • Yes, I do not have a good math background and dont really understand the linked post, but thanks for the help here..@Dave – Minsky Jun 23 '23 at 18:05
  • 1
    Actually think i finally got it, when we put x^2 as g we can easily think also about x as u and then we have f(g,u) = ag + bu + c and then we will be fitting a plane to some extent. @Dave – Minsky Jun 23 '23 at 18:15

0 Answers0