The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Unit: SDL_math2
Class: TCurveFit
Declaration: function CalcRegModel (RegModel: TRegModel; PolyOrder: integer): integer;

The procedure CalcRegModel calculates a regression model of a particular type which is specified by the parameter RegModel. The parameter PolyOrder is only used for polynomial models (RegModel = rmPolynomial or RegModel = rmCenteredPoly) and is ignored in all other cases.

Actually the CalcRegModel method serves as a convenient "binder" of most of the regression methods available in TCurveFit. The only difference to the individual methods listed in the following table is that the found regression parameters are not returned directly but have to be retrieved via special properties such as FitQual, ModelPar and CPXShift.

RegModel Parameter Short Description Details
rmNone undefined model  
rmLinear linear (straigt line) model CalcLinFit
rmParabolic parabolic model CalcParabolFit
rmGaussian bell shaped Gaussian curve CalcGaussFit
rmReciLin reciprocal linear model CalcReciLinFit
rmHyperbolic hyperbolic model CalcHyperbolFit
rmReciHyperbolic reciprocal hyperbolic model CalcReciHyperbolFit
rmLog logarithmic model CalcLogFit
rmReciLog reciprocal logarithmic model CalcReciLogFit
rmPower power function CalcPowerFit
rmExpo exponential function CalcExponentialFit
rmHoerl Hoerl function CalcHoerlFit
rmCircle circle CalcCircleFit
rmPolynomial polynomial model (order 1 to 10) CalcPolyFit
rmCenteredPoly centered polynomial model (order 1 to 10) CalcCenteredPolyFit

The data points have to be entered by using the procedure EnterStatValue. Do not forget to reset the statistics calculation before entering any new data sets (use Init)

Last Update: 2023-Feb-06