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

R2 value.

Pascal
function R2(const Y: TVec; const YCalc: TVec): double;
Parameters 
Description 
Defines vector of dependant variable. 
YCalc 
Defines vector of estimated dependant variable values. 

The R2 value, in this case defined by the following equation: 

R2 = 1.0 - SumOfSquares(Y-YCalc)/SumOfSquares(Y-Mean(Y)) 

.

There are several ways to calculate R2, all equivalent for a linear model where model includes a constant term, but not equivalent otherwise.

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