Analysis Of Variance Calculator
[Login to edit this page]
There are several different definitions of R2 which are only sometimes equivalent. One class of such cases includes that of linear regression. In this case, R2 is simply the square of the sample correlation coefficient between the outcomes and their predicted values, or in the case of simple linear regression, between the outcome and the values being used for prediction. In such cases, the values vary from 0 to 1. Important cases where the computational definition of R2 can yield negative values, depending on the definition used, arise where the predictions which are being compared to the corresponding outcome have not derived from a model-fitting procedure using those data.
A data set has values yi, each of which has an associated modeled value fi (also sometimes referred to as ). Here, the values yi are called the observed values and the modeled values fi are sometimes called the predicted values.
The "variability" of the data set is measured through different sums of squares:
In the above is the mean of the observed data:
where n is the number of observations.
The notations SSR and SSE should be avoided, since in some texts their meaning is reversed to Residual sum of squares and Explained sum of squares, respectively.
The most general definition of the coefficient of determination is
In the general form, R2 can be seen to be related to the unexplained variance, since the second term compares the unexplained variance (variance of the model's errors) with the total variance (of the data). See fraction of variance unexplained.
In some cases the total sum of squares equals the sum of the two other sums of squares defined above,
See sum of squares for a derivation of this result for one case where the relation holds. When this relation does hold, the above definition of R2 is equivalent to
0 Comments
Write a comment