Predicted R-Squared Calculator
Inputs
- Inputs: PRESS = 184.50, total sum of squares = 1,250.00, ordinary R-squared = 87.40%, n = 40 and p = 4 predictors.
- Predicted R-squared: 1 - 184.50 / 1,250.00 = 85.24%.
- Adjusted R-squared: 85.96%; prediction gap: 0.72 pts.
- Predicted R-squared result: 85.24% - root mean square error of prediction 2.1477.
Ordinary R-squared has a public-relations problem: it never falls when you add a predictor, however useless, so it grades every model as at least as good as the last. Predicted R-squared asks the ruder question - how well does this model predict observations it has never seen? It is built from PRESS, the prediction sum of squares, in which every observation is predicted by a model fitted without it and the errors are squared and summed. One minus PRESS over the total sum of squares is a number that can fall, can embarrass, and can even go negative - which is exactly why it is trusted.
Enter PRESS, the total sum of squares, the ordinary R-squared, the sample size and the predictor count, and this calculator returns the predicted R-squared, the adjusted R-squared, the gap between them, and the root mean square error of prediction. The worked examples show a healthy four-predictor model, a three-predictor model starting to overfit, and a larger six-predictor fit.
Worked examples
Four predictors on 40 cases
(184.5 · 1250 · 87.4 % · 40 · 4)
| Predicted R-squared | 85.24% |
| Adjusted R-squared | 85.96% |
| Prediction gap (adjusted - predicted) | 0.72 pts |
| Root mean square error of prediction | 2.1477 |
Three predictors on 30 cases
(92.3 · 640 · 88.9 % · 30 · 3)
| Predicted R-squared | 85.58% |
| Adjusted R-squared | 87.62% |
| Prediction gap (adjusted - predicted) | 2.04 pts |
| Root mean square error of prediction | 1.7540 |
Six predictors on 60 cases
(1250 · 9800 · 89.6 % · 60 · 6)
| Predicted R-squared | 87.24% |
| Adjusted R-squared | 88.42% |
| Prediction gap (adjusted - predicted) | 1.18 pts |
| Root mean square error of prediction | 4.5644 |
PRESS and the leave-one-out idea
PRESS sounds expensive - refit the model n times, leaving one observation out each time - but a classical shortcut makes it nearly free: each leave-one-out residual is the ordinary residual divided by one minus that point's leverage, so the whole statistic falls out of a single fit. What it measures is honesty under interrogation. A model that has memorised its data predicts its own observations beautifully and strangers badly; PRESS only ever interviews strangers.
The first worked example is a model with nothing to hide. PRESS of 184.50 against a total sum of squares of 1,250.00 gives a predicted R-squared of 1 - 184.50 / 1,250.00 = 85.24%. Its ordinary R-squared is 87.40% and its adjusted R-squared 85.96% - the three figures huddle together, which is the signature of a model whose complexity is earning its keep on 40 observations with 4 predictors.
The per-case scale of the prediction error is the fourth figure: the root mean square error of prediction, the square root of PRESS over n - 2.1477 here, in the response's own units. Percentages compare models; this is the number that tells a practitioner how wrong a single new prediction should expect to be.
- Predicted R-squared = 1 - PRESS / SS(total), from leave-one-out prediction errors.
- Unlike ordinary R-squared, it falls when a useless predictor is added - and can go negative.
- The gap between adjusted and predicted R-squared is the working overfitting gauge.
- Root mean square error of prediction = sqrt(PRESS / n), in the response's units.
The prediction gap: an overfitting gauge
Adjusted R-squared already penalises complexity, but it penalises by formula, not by performance. The gap between the adjusted and predicted figures is a performance audit: small gaps mean the penalty was roughly right, and a gap beyond roughly ten points is the standard alarm that the model has been fitted to the sample's accidents. The examples here are all on the healthy side of that line, which makes them a useful calibration set.
The second example shows the early stage. Thirty observations, 3 predictors, an ordinary R-squared of 88.90% - and a predicted R-squared of 85.58%, leaving a gap of 2.04 points against the adjusted 87.62%. Nothing is broken; the model is simply beginning to spend some of its fit on noise, and the gap says so two decimal places before any individual coefficient looks suspicious.
The third example shows scale buying honesty. Sixty observations carrying 6 predictors produce an adjusted 88.42% and a predicted 87.24% - a gap of only 1.18 points despite the larger model, because each predictor is supported by more data. Overfitting is a ratio disease - parameters per observation - and the gap measures the symptom directly.
| Example | n / predictors | Adjusted R-squared | Predicted R-squared | Gap |
|---|---|---|---|---|
| Four-predictor fit | 40 / 4 | 85.96% | 85.24% | 0.72 pts |
| Three-predictor fit | 30 / 3 | 87.62% | 85.58% | 2.04 pts |
| Six-predictor fit | 60 / 6 | 88.42% | 87.24% | 1.18 pts |
Worked examples
Example 1: PRESS statistic 184.5; Total sum of squares (SST) 1250; Ordinary R-squared 87.4; Sample size n 40; Number of predictors p 4. Predicted R-squared = 85.24%. Supporting values: Adjusted R-squared 85.96%; Prediction gap (adjusted - predicted) 0.72 pts; Root mean square error of prediction 2.1477. Inputs: PRESS = 184.50, total sum of squares = 1,250.00, ordinary R-squared = 87.40%, n = 40 and p = 4 predictors. Predicted R-squared: 1 - 184.50 / 1,250.00 = 85.24%. Adjusted R-squared: 85.96%; prediction gap: 0.72 pts. Predicted R-squared result: 85.24% - root mean square error of prediction 2.1477.
Example 2: PRESS statistic 92.3; Total sum of squares (SST) 640; Ordinary R-squared 88.9; Sample size n 30; Number of predictors p 3. Predicted R-squared = 85.58%. Supporting values: Adjusted R-squared 87.62%; Prediction gap (adjusted - predicted) 2.04 pts; Root mean square error of prediction 1.7540. Inputs: PRESS = 92.30, total sum of squares = 640.00, ordinary R-squared = 88.90%, n = 30 and p = 3 predictors. Predicted R-squared: 1 - 92.30 / 640.00 = 85.58%. Adjusted R-squared: 87.62%; prediction gap: 2.04 pts. Predicted R-squared result: 85.58% - root mean square error of prediction 1.7540.
Example 3: PRESS statistic 1250; Total sum of squares (SST) 9800; Ordinary R-squared 89.6; Sample size n 60; Number of predictors p 6. Predicted R-squared = 87.24%. Supporting values: Adjusted R-squared 88.42%; Prediction gap (adjusted - predicted) 1.18 pts; Root mean square error of prediction 4.5644. Inputs: PRESS = 1,250.00, total sum of squares = 9,800.00, ordinary R-squared = 89.60%, n = 60 and p = 6 predictors. Predicted R-squared: 1 - 1,250.00 / 9,800.00 = 87.24%. Adjusted R-squared: 88.42%; prediction gap: 1.18 pts. Predicted R-squared result: 87.24% - root mean square error of prediction 4.5644.
Predicted against ordinary and adjusted R-squared
The three statistics answer three different questions, and most reporting confusion comes from treating them as rivals. Ordinary R-squared asks how much of this sample's variance the fit describes. Adjusted asks the same question with a complexity tax. Predicted asks how much of a new sample's variance the model would explain - the only one of the three that is a forecast rather than a description.
That is why the predicted figure is the one to quote when a model will be used for prediction, and why it is systematically the lowest of the three. The first example's descent from 87.40% through 85.96% to 85.24% is not three estimates disagreeing; it is one model being described, taxed, and then tested. A paper that reports only the first number has shown you the kindest of the three.
Shrinking the gap
When the gap alarms, the remedies are the usual ones, now with a scoreboard. Remove predictors whose absence barely moves PRESS - the statistic will tell you immediately, because it falls when dead weight is added and rises when it is dropped. Collect more observations, which attacks the ratio directly. Or shrink the coefficients deliberately, trading a little bias for a lot of variance reduction; ridge-style fits are, in PRESS terms, machines for closing this gap.
What not to do is shop for the specification that maximises predicted R-squared across hundreds of candidates and then quote it as validation. Selecting on the validator consumes it. The statistic stays honest exactly as long as it is used to audit a small number of principled models - which is the use this page is built for.
Where PRESS comes from
Most regression packages report PRESS directly, and this calculator takes it as an input so the surrounding figures - the adjusted value, the gap, the per-case error - can be assembled in one place from a printout. If your package prints the ordinary and adjusted R-squared with the sample size and predictor count, as the examples here assume, everything else on the page follows.
One caution about the input: PRESS is in squared response units, and the total sum of squares must be the corrected total - deviations from the mean - for the ratio to mean what the examples mean. Feeding an uncorrected sum silently inflates the predicted R-squared, and the gap will look flattering for the worst of reasons.
FAQs
What predicted R-squared does PRESS 184.50 with SST 1,250.00 give?
85.24% - one minus PRESS over the total sum of squares. Against an adjusted R-squared of 85.96% the prediction gap is only 0.72 points, the signature of a model whose complexity is earning its keep.
How is predicted R-squared different from adjusted?
Adjusted penalises complexity by a formula involving n and the predictor count. Predicted measures actual leave-one-out performance through PRESS. The gap between them - 2.04 points in the second example - is the working overfitting gauge.
Can predicted R-squared be negative?
Yes. If PRESS exceeds the total sum of squares, the model predicts new observations worse than the sample mean would. Ordinary R-squared can never do this, which is precisely why the predicted version is the honest one.
What gap should worry me?
Beyond roughly ten points between adjusted and predicted is the standard alarm. All three examples here are far inside it - 0.72, 2.04 and 1.18 points - with the 30-observation example showing the earliest stage of overfitting.
What is the root mean square error of prediction?
The square root of PRESS over n - the typical size of a leave-one-out prediction error, in the response's own units. It is 2.1477 in the first example and 4.5644 in the third, whose response simply varies on a larger scale.
Does adding predictors always hurt predicted R-squared?
No - adding a genuinely informative predictor lowers PRESS and raises it. That asymmetry is the statistic's virtue: ordinary R-squared rewards every addition, predicted R-squared rewards only the ones that predict strangers well.