- #1
fog37
- 1,569
- 108
- TL;DR Summary
- Difference between nonlinear least squares vs ordinary least squares
hello,
I understand that the method of ordinary least squares (OLS) is about finding the coefficients that minimize the sum ##\Sigma (y_{observed} -g(X))^2## where ##g(X)## is the statistical model chosen to fit the data. Beside OLS, there clearly other coefficient estimation methods (MLE, etc.)
In general, OLS is fair game when the model ##g(X)## is "linear with respect with the parameters" (linear regression, polynomial regression, etc.): any model that is the sum of several terms with each term being the product of the estimated coefficient and whatever variable: ##g(X) =\Sigma \beta f(X)## where ##f(X)## are like the basis functions. For example, ##g(X)=\beta_0 +\beta_1 X+\beta_2 X^2## is linear and the basis functions are the three functions ##1, X, X^2##...
Of course, the OLS approach is valid as long as specific assumptions on the residuals are met. Additionally, after taking the first derivative and setting them to zero, we are able to arrive to nice analytical formulas for the coefficients.
That said, what is the issue with using OLS when ##g(X)## is a nonlinear model? I know that sometimes we "convert" a nonlinear model so that it assume the form of a linear model. That strategy then allows us to use OLS on the new model based on the transformed variables...That is a useful hack.
But I have reading about "nonlinear least squares". Isn't it the same approach as OLS but when the model is nonlinear where we directly plug the nonlinear model ##g(X)## in ##\Sigma (y_{observed} -g(X))^2## ? We may not end up with analytical estimators and have to solve for the coefficients using some numerical method...But I don't see an issue apply OLS to nonlinear models...
Thank you.
I understand that the method of ordinary least squares (OLS) is about finding the coefficients that minimize the sum ##\Sigma (y_{observed} -g(X))^2## where ##g(X)## is the statistical model chosen to fit the data. Beside OLS, there clearly other coefficient estimation methods (MLE, etc.)
In general, OLS is fair game when the model ##g(X)## is "linear with respect with the parameters" (linear regression, polynomial regression, etc.): any model that is the sum of several terms with each term being the product of the estimated coefficient and whatever variable: ##g(X) =\Sigma \beta f(X)## where ##f(X)## are like the basis functions. For example, ##g(X)=\beta_0 +\beta_1 X+\beta_2 X^2## is linear and the basis functions are the three functions ##1, X, X^2##...
Of course, the OLS approach is valid as long as specific assumptions on the residuals are met. Additionally, after taking the first derivative and setting them to zero, we are able to arrive to nice analytical formulas for the coefficients.
That said, what is the issue with using OLS when ##g(X)## is a nonlinear model? I know that sometimes we "convert" a nonlinear model so that it assume the form of a linear model. That strategy then allows us to use OLS on the new model based on the transformed variables...That is a useful hack.
But I have reading about "nonlinear least squares". Isn't it the same approach as OLS but when the model is nonlinear where we directly plug the nonlinear model ##g(X)## in ##\Sigma (y_{observed} -g(X))^2## ? We may not end up with analytical estimators and have to solve for the coefficients using some numerical method...But I don't see an issue apply OLS to nonlinear models...
Thank you.