Page 1 of 1

Regression courbe (R²)

Posted: Thu Apr 19, 2012 8:57 am
by 9345971
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

Re: Regression courbe (R²)

Posted: Thu Apr 19, 2012 10:54 am
by narcis
Hi Christian,

You should probably do as explained in the What's New?\Welcome!\New Features\Functions\y=mx+b example at the features demo available at TeeChart's program group. More information also available in this thread.

Hope this helps!