It is calculated as the ratio of the regression sum of squares (SSR) to the total sum of squares (SST):
$$R^2 = \frac{SSR}{SST}$$
If $R^2 = 1.0$, this means that the regression line perfectly fits the data, and there is no error in the predictions. In this case,
Show more…