WebCab Probability and Statistics for COM v3.6

GeneralLinear.RSquared Method 

Evaluates the multiple R2 (aka multiple coefficient of determination) of the (multi-linear) regression considered.

public double RSquared();

Return Value

The multiple R2 (aka multiple coefficient of determination) of the (multi-linear) regression considered.

Remarks

Further Details

The multiple coefficient of determination is a measure of the goodness of fit for the linear regression equation. Moreover, the statistics can be viewed as the proportion of the variability in the dependent variable that can be explained by the multiple regression equation (see example below). The multiple R2 will lie within the interval [0,1], where the closer to 1 the better the predictive ability of the model.

Example

If the multiple linear regression equation represents the time taken to complete a bus route where the model has two variables: the length (in kms) of the bus route and the number of stops on the route. If the multiple R2 of this regression equation is 0.95, then it means that 95 percentage of the variability of the travel time to complete a route is explained by the estimated multiple regression equation with the length of the bus route and number of stops as the independent variables.

Preconditions

Please note that before this method is called you must have already performed the following tasks:

  1. Set the Fitting Function using SetFunctionBasis
  2. Fit the function using SetGeneralFit

See Also

GeneralLinear Class | WebCab.COM.Statistics.CurveFitting Namespace | RSquaredAdjusted() - Evaluates the Adjusted R2 which safe guards against the over-estimation of the effect of adding additional variables to a model.