How this calculator works
R squared compares squared prediction error with the variation around the observed response mean. It can be negative when predictions perform worse than that mean. The correlation shortcut applies to ordinary simple linear regression with an intercept; it is not a general replacement for SSE and SST. Adjusted R squared accounts for the number of predictor terms and needs positive residual degrees of freedom.
Formula
R² = 1 - SSE/SST; adjusted R² = 1 - (1 - R²)(n - 1)/(n - k - 1). For simple OLS with intercept, R² = r².
Worked example
Observed values 1, 2, 3 and predictions 1, 2, 2 give SSE 1, SST 2 and R squared 0.5. With correlation 0.8, n = 10 and one predictor, R squared is 0.64 and adjusted R squared is 0.595.
Advertisement
Frequently asked questions
Can R squared be negative?
Yes. Arbitrary predictions or models without an intercept can perform worse than the response mean.
Does high R squared prove a good model?
No. Check residual patterns, scientific plausibility, uncertainty and performance on new data.
Why reject constant responses?
SST is zero, so the usual ratio defining R squared has a zero denominator.