You are here: Symbol Reference > Regress Namespace > Functions > Regress.NLinRegress Function
Stats Master VCL
ContentsIndex
PreviousUpNext
Regress.NLinRegress Function

Non-linear regression with lower and upper bounds.

Pascal
function NLinRegress(const X: TVecList; const Y: TVec; RegFun: TMultiRegressFun; DeriveProc: TMultiDeriveProc; const B: TVec; const BLowerB: TVec; const BUpperB: TVec; Method: TOptMethod; out StopReason: TOptStopReason; const Weights: TVec = nil; const YCalc: TVec = nil; SoftSearch: boolean = false; MaxIter: Integer = 500; Tol: double = 0.00000001; GradTol: double = 0.00000001; const Verbose: TStrings = nil): Integer; overload;
Parameters 
Description 
List of vectors of independent variable(s). 
Vector of dependent variable. 
RegFun 
Regression function. 
DeriveProc 
Procedure to calculate the derivatives of RegFun. You can define the exact derivative or use NumericDerive routine as numerical approximation. 
Holds initial estimate for regression parameters. After the call to NLinRegress b returns calculated regression parameters. 
BLowerB 
Holds lower bounds for regression parameters. If there are no lower bounds, set BLowerB values to -INF
BUpperB 
Holds upper bounds for regression parameters. If there are no upper bounds, set BUpperB values to +INF
Method 
Defines which optimization method will be used to find regression parameters (see MtxVec.hlp TOptMethod type to learn more about this). 
StopReason 
Returns why regression parameters search stopped (see MtxVec.hlp TOptStopReason type to learn more about different stop reasons). 
Weights 
Weights (optional). 
YCalc 
Returns calculated values (optional). 
SoftSearch 
If true, internal line search algoritm will use soft line search method. Set this parameter to true if you're using numerical approximation for derivative. If this parameter is set to false, internal line search algorithm will use exact line search method. Set this parameter to false if you're using *exact* derivative. 
MaxIter 
Maximum allowed numer of allowed iterations. 
Tol 
Desired regression parameters tolerance. 
GradTol 
Minimum allowed gradient C-Norm
Verbose 
If assigned, stores Fun, evaluated at each iteration step. Optionally, you can also pass TOptControl object to the Verbose parameter. This allows the optimization procedure to be interrupted from another thread and optionally also allows logging and iteration count monitoring.  

Number of iterations needed to calculate regression parameters with specified tolerance.

General non-linear regression with lower and upper bounds for regression coefficients.

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!