Fits a multivariate nonlinear regression model using least squares.
For a list of all members of this type, see NonlinearRegression Members.
System.Object
Imsl.Stat.NonlinearRegression
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
The nonlinear regression model is
where the observed values of the constitute the responses or values of the dependent variable, the known are vectors of values of the independent (explanatory) variables, is the vector of regression parameters, and the are independently distributed normal errors each with mean zero and variance . For this model, a least squares estimate of is also a maximum likelihood estimate of .
The residuals for the model are
A value of that minimizes is the least-squares estimate of calculated by this class.NonlinearRegression
accepts these residuals one at a time as input from a user-supplied function. This allows NonlinearRegression
to handle cases where is so large that data cannot reside in an array but must reside in a secondary storage device.
NonlinearRegression
is based on MINPACK routines LMDIF
and LMDER
by More' et al. (1980). NonlinearRegression
uses a modified Levenberg-Marquardt method to generate a sequence of approximations to the solution. Let be the current estimate of . A new estimate is given by
The algorithm uses a "trust region" approach with a step bound of . A solution of the equations is first obtained for . If , this update is accepted; otherwise, is set to a positive value and another solution is obtained. The method is discussed by Levenberg (1944), Marquardt (1963), and Dennis and Schnabel (1983, pages 129 - 147, 218 - 338).
Forward finite differences are used to estimate the Jacobian numerically unless the user supplied function computes the derivatives. In this case the Jacobian is computed analytically via the user-supplied function.
NonlinearRegression
does not actually store the Jacobian but uses fast Givens transformations to construct an orthogonal reduction of the Jacobian to upper triangular form. The reduction is based on fast Givens transformations (see Golub and Van Loan 1983, pages 156-162, Gentleman 1974). This method has two main advantages:
A weighted least squares fit can also be performed. This is appropriate when the variance of in the nonlinear regression model is not constant but instead is . Here, are weights input via the user supplied function. For the weighted case, NonlinearRegression
finds the estimate by minimizing a weighted sum of squares error.
Nonlinear regression allows users to specify the model's functional form. This added flexibility can cause unexpected convergence problems for users who are unaware of the limitations of the algorithm. Also, in many cases, there are possible remedies that may not be immediately obvious. The following is a list of possible convergence problems and some remedies. No one-to-one correspondence exists between the problems and the remedies. Remedies for some problems may also be relevant for the other problems.
R
matrix value given by R is inaccurate. If only a function is supplied try providing the NonlinearRegression.IDerivative. If the derivative is supplied try providing only NonlinearRegression.IFunction. Note that the Solve method must be called before using any property as a right operand, otherwise the value is null
.
Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll)
NonlinearRegression Members | Imsl.Stat Namespace | Example 1 | Example 2 | Example 3