Regression courbe (R²)
Posted: Thu Apr 19, 2012 8:57 am
I would like to know if there is a function to get the R ² of a regression curve
I found this function
//==============================================================================
Procedure TFormRecherche.ShowFunction1(TeeFunction:TCurveFittingFunction);
var t : Integer;
tmp : String;
begin
tmp:='y=';
With TeeFunction1 do
for t:=1 to PolyDegree do
begin
tmp:=tmp+' ';
if AnswerVector[t]>=0 then tmp:=tmp+'+';
tmp:=tmp+FormatFloat('0.0#',AnswerVector[t])+'*x';
if t>1 then tmp:=tmp+'^'+IntToStr(t);
end;
{ show the expression }
Edit1.Text := 'Débit réseau: '+tmp;
end;
Thank you for your help
Christian
I found this function
//==============================================================================
Procedure TFormRecherche.ShowFunction1(TeeFunction:TCurveFittingFunction);
var t : Integer;
tmp : String;
begin
tmp:='y=';
With TeeFunction1 do
for t:=1 to PolyDegree do
begin
tmp:=tmp+' ';
if AnswerVector[t]>=0 then tmp:=tmp+'+';
tmp:=tmp+FormatFloat('0.0#',AnswerVector[t])+'*x';
if t>1 then tmp:=tmp+'^'+IntToStr(t);
end;
{ show the expression }
Edit1.Text := 'Débit réseau: '+tmp;
end;
Thank you for your help
Christian