NonlinearRegression Class |
Namespace: Imsl.Stat
The NonlinearRegression type exposes the following members.
Name | Description | |
---|---|---|
NonlinearRegression |
Constructs a new nonlinear regression object.
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetCoefficient |
Returns the estimate for a coefficient.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetSSE |
Returns the sums of squares for error.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Solve |
Solves the least squares problem and returns the regression
coefficients.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
AbsoluteTolerance |
The absolute function tolerance.
| |
Coefficients |
The regression coefficients.
| |
DFError |
The degrees of freedom for error.
| |
Digits |
The number of good digits in the residuals.
| |
ErrorStatus |
Characterizes the performance of NonlinearRegression.
| |
FalseConvergenceTolerance |
The false convergence tolerance.
| |
GradientTolerance |
The gradient tolerance.
| |
Guess |
The initial guess of the parameter values.
| |
InitialTrustRegion |
The initial trust region radius.
| |
MaxIterations |
The maximum number of iterations allowed during optimization
| |
MaxStepsize |
The maximum allowable stepsize.
| |
R |
A copy of the R matrix.
| |
Rank |
The rank of the matrix.
| |
RelativeTolerance |
The relative function tolerance
| |
Scale |
The scaling array for theta.
| |
StepTolerance |
The step tolerance.
|
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
where is a solution to Here, is the Jacobian evaluated at .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.
Programming NotesNonlinear 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.
Note that the Solve(NonlinearRegressionIFunction) method must be called before using any property as a right operand, otherwise the value is null.