double R2(TVec *Y, TVec *YCalc);
R2 value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Y | TVec * | Defines vector of dependant variable. |
| 2 | YCalc | TVec * | Defines vector of estimated dependant variable values. |
Returns: The R2 value, in this case defined by the following equation: R2 = 1.0 - SumOfSquares(Y-YCalc)/SumOfSquares(Y-Mean(Y)).
Remarks:
There are several ways to calculate R2, all equivalent for a linear model where model includes a constant term, but not equivalent otherwise.
See Also: Regress::RegressTest
Declared in Dew::Stats::Units::Regress · Dew.Stats/Units.Regress.h · Cross-compiler