Non-linear least squares
Iterative method for fitting nonlinear models to data.
Last updated
Non-linear least squares is a technique within least squares analysis for fitting a set of m observations to a model that depends nonlinearly on n unknown parameters, provided m is at least n. It appears in certain types of nonlinear regression.
The core idea involves approximating the nonlinear model with a linear one and then improving the parameter estimates through repeated iterations. While it shares many features with linear least squares, there are important differences. In economics, this method is used in probit regression, threshold regression, smooth regression, logistic link regression, and with Box–Cox transformed regressors.
Theory
The goal is to find a parameter vector that minimizes the sum of squared residuals—the differences between observed data points and the model's predictions. Because the model is nonlinear, the derivatives in the gradient equations depend on both the independent variable and the parameters, so these equations generally cannot be solved directly. Instead, initial guesses for the parameters are chosen, and the parameters are refined step by step. At each iteration, the model is approximated using a first-order Taylor series expansion around the current parameter values.
This linearization leads to a set of normal equations, which are expressed in matrix form using the Jacobian matrix. These equations form the basis of the Gauss–Newton algorithm for solving nonlinear least squares problems. Note that the sign convention in defining the Jacobian can vary across sources.
Extension by weights
When observations have different reliability, a weighted sum of squares can be minimized. Ideally, each weight in the diagonal weight matrix should be the reciprocal of the measurement's error variance. The normal equations are then adjusted accordingly.
Geometrical interpretation
Geometrically, in linear least squares, the objective function is a quadratic function of the parameters. With one parameter, its graph is a parabola; with two or more, the contours are concentric ellipses, and the minimum lies at their center.
In nonlinear least squares, the objective function is only quadratic near the minimum, where the truncated Taylor series is a good approximation. Farther from the optimum, the contours become non-elliptical. This makes it important to start with parameter estimates as close as possible to the true optimal values, and it explains why the Gauss–Newton algorithm can diverge if the objective function is not approximately quadratic.
Initial parameter estimates
Good initial parameter estimates can be found through computer simulation, where observed and calculated data are displayed and parameters are manually adjusted until the fit looks reasonable. Transformations or linearizations can also help. More advanced methods, like the Stochastic Funnel Algorithm, can locate the convex basin of attraction around the optimal estimates. Hybrid algorithms that combine randomization and elitism with Newton methods have proven useful and computationally efficient.
Various solution methods can be applied. A common convergence criterion is that the sum of squares should not increase from one iteration to the next, though this can be tricky to implement. A practical alternative is to check that the relative change in the sum of squares falls below a threshold, such as 0.0001, which may need adjustment for large experimental errors. Another criterion is that the relative change in each parameter should be less than a set value, like 0.001, corresponding to 0.1% precision, provided this is smaller than the largest relative standard deviation on the parameters.
When analytical derivatives for the Jacobian are difficult or impossible to obtain, numerical approximation is used. This involves calculating the model's value at slightly perturbed parameter values. The increment size must be chosen carefully to avoid approximation error from being too large or round-off error from being too small.
Quick Facts
- Applications
- Probit regression
- threshold regression
- smooth regression
- logistic link regression
- Box–Cox transformed regressors
Facts from the source article.
Lore & Background
Non-linear least squares is the form of least squares analysis used to fit a set of m observations with a model that is non-linear in n unknown parameters (m ≥ n). It is used in some forms of nonlinear regression.
The basis of the method is to approximate the model by a linear one and to refine the parameters by successive iterations. There are many similarities to linear least squares, but also some significant differences. In economic theory, the non-linear least squares method is applied in (i) the probit regression, (ii) threshold regression, (iii) smooth regression, (iv) logistic link regression, (v) Box–Cox transformed regressors.
Reader's Guide
Non-linear least squares is a fundamental technique in statistical modeling when the relationship between variables is not linear. Its significance lies in its ability to handle complex models where parameters enter nonlinearly, such as in economic applications like probit and threshold regression.
The method works by iteratively linearizing the model using a first-order Taylor expansion and solving for parameter updates, a process that continues until convergence. This approach allows analysts to fit models that would otherwise have no closed-form solution, making it indispensable for empirical research in economics and other fields. The technique's legacy is its extension of least squares principles to a much broader class of problems, enabling more realistic and flexible data analysis.
Frequently Asked Questions
Who is Non-linear least squares?
Non-linear least squares is an iterative fitting procedure in statistical regression that estimates n unknown parameters (with m ≥ n observations) by repeatedly approximating a non-linear model with a linear one and refining the estimates.
What is Non-linear least squares known for?
It linearizes a non-linear model around the current parameter guess, solves the resulting linear least-squares problem, and updates the parameters in a loop until convergence. It underpins probit regression, threshold regression, smooth regression, logistic link regression, and Box–Cox transformed regressors.
What is Non-linear least squares's origin story?
It grew out of classical least-squares regression, extending the method to cases where parameters enter the model non-linearly and therefore require a repeated cycle of local linearization rather than one algebraic solution.
More in Probability & Statistics
Sources
Compiled from Wikipedia and the sources listed below. Text from Wikipedia is available under CC BY-SA 4.0; this entry is adapted from it.
- Wikipedia: Non-linear least squares (CC BY-SA 4.0).
- Word definitions: the Codexery glossary, each quoted from its Wikipedia article.
Spotted an error? Know more?
Reader corrections go straight into our review queue. Suggest an edit · How this site is sourced