Dew Stats Master .NET
TMtxNonLinReg.RegressFunction Property
Summary
Defines the regression function of several regression parameters.

Class
TMtxNonLinReg

Declaration
Property RegressFunction: TRegressFun read FRegressFunction write SetRegressFunction;
Description
Defines the regression function of several regression parameters B and independent variable X.
 See Also 
DeriveProcedure 

Example 1

In the following example we define general polynomial of second degree (three parameters) and also the procedure for derivatives:

// y=b0*x*x + b1*x + b2 i.e. parabola function SimpleParabola(B: Array of TSample; X: TSample): TSample; begin Result := b[0]*Sqr(x) + b[1]*x + b[2]; end; // procedure for derivatives procedure SimplePabolaDeriv(RegressFun: TRegressFun; X, Y: TSample; Pars: Array of TSample; Grad: TVec); begin Grad[0] := Sqr(x); Grad[1] := x; Grad[2] := 1; end; begin // ... MtxNonLinReg1.RegressFunction := SimpleParabola; MtxNonLinReg1.DeriveProcedure := SimpleParabolaDeriv; end;


Copyright 2008 Dew Research
http://www.dewresearch.com