Adjusted R-squared (R²_adj)

Machine Learning
Introduced by
Henri Theil
Year
1961
Type
Penalized goodness-of-fit metric
Family
Regression evaluation

What does it do?

Adjusted R² is a corrected version of the coefficient of determination that accounts for both the number of predictors and the sample size in a regression model.

It is commonly attributed to Henri Theil (1961). It addresses a limitation of standard R²: R² does not decrease when a predictor is added, even if that predictor contributes little to explaining the target variable.

The intuition behind the method

Adjusted R² scales the unexplained share of variance (1 − R²) by the factor (n−1)/(n−p−1), where n is the sample size and p is the number of predictors. This factor grows as p increases relative to n, so the adjusted value falls unless a new predictor improves R² by enough to offset the lost degrees of freedom. The penalty therefore depends on both p and n, not on p alone. It is used to compare ordinary least squares models of the same response variable, most naturally when they are nested. For non-nested models, information criteria or validation are generally preferred (see whenToUse). A higher value alone does not establish that a model will predict well on new data.

History

Henri Theil's 1961 work on economic forecasting is commonly cited as the origin of the degrees-of-freedom adjustment to R². The adjustment is now included in most standard regression software.

When to use it

Use adjusted R² to compare ordinary least squares regression models that share the same response variable, especially when one model is nested within another. It is useful in exploratory variable selection, where it shows whether an added predictor improves fit enough to offset the extra parameter it adds. A higher adjusted R² favours the model, but the difference is a descriptive comparison rather than a significance test. For nested models, the F-test for nested models provides the formal check. Avoid relying on it when the sample is small relative to the number of predictors, because the denominator n−p−1 then approaches zero and the adjustment becomes severe. For non-nested models, or for prediction-focused comparisons, information criteria or out-of-sample validation are more suitable. It is also not appropriate for nonlinear or logistic models, where its formula does not apply.

Limitations and considerations

  • Inherits the linearity and ordinary least squares assumptions of R²; it is not defined for nonlinear or logistic models.
  • The penalty has a fixed functional form, (n−1)/(n−p−1), and is not tuned to the predictive risk of a particular problem, so it may over- or under-penalize predictors in some settings.
  • Does not address multicollinearity among predictors; correlated predictors can each appear useful while adding little independent information.
  • Measures in-sample fit with a degrees-of-freedom correction, not accuracy on new observations.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Applies an explicit penalty that depends on the number of predictors and the sample size, so adding a weak predictor can lower the score.
  • Allows comparison of linear regression models with different numbers of predictors on the same data, where raw R² would not.
  • Keeps the familiar R² scale, so results remain easy to interpret alongside standard R².
  • The adjustment is a single closed-form expression that is simple to compute and explain.

Applications

  • Variable selection in econometrics: identifying which economic indicators (inflation, unemployment, interest rates) best predict GDP without over-parameterization
  • Clinical prediction: determining the minimal set of diagnostic tests that explain patient mortality without unnecessary testing
  • Marketing analytics: selecting which customer attributes (age, income, purchase history) to include in churn prediction models
  • Environmental modeling: choosing among competing climate variables to explain regional temperature anomalies
  • Production engineering: determining the fewest process parameters needed to model final product quality

How it works

How it works

1

First compute standard R² from the residual sum of squares and the total sum of squares.

Formula
R^2 = 1 - \frac{SS_{res}}{SS_{tot}}
2

The penalty is not applied on its own: the adjustment is carried entirely by the factor (n−1)/(n−p−1) in the final step. Its denominator n−p−1 is the residual degrees of freedom left after estimating p slopes and an intercept.

Formula
\text{penalty} = \frac{p}{n - p - 1}
3

Multiply (1 − R²) by the factor (n−1)/(n−p−1), which requires n−p−1 > 0, then subtract the product from 1. The result is never larger than R² when the model contains at least one predictor, and it can be negative.

Formula
R^2_{adj} = 1 - (1 - R^2) \cdot \frac{n - 1}{n - p - 1}

Common pitfalls

  • Treating a higher adjusted R² as proof of good out-of-sample performance; validation on held-out data is still needed.
  • Using it to compare non-nested models, where information criteria or validation-based metrics are more appropriate.
  • Overlooking the denominator n−p−1: when p is close to n−1 the adjustment is very large and the value can fall sharply, and the formula is undefined when n−p−1 equals zero.
  • Expecting adjusted R² to rise whenever a predictor is statistically significant; the two criteria measure different things, and a significant predictor with a small gain in R² can still lower the adjusted value.
  • Treating a small change in adjusted R² as a formal test result; the change is descriptive, and for nested OLS models the F-test for nested models is the inferential check.
  • Comparing models with different response variables, or with the response transformed differently, since their adjusted values then describe different quantities.

Frequently asked questions

When should I use adjusted R² instead of AIC or BIC?

Adjusted R² is simpler and more interpretable, which makes it suitable for exploratory analysis and teaching. AIC and BIC are information-theoretic measures that also penalize model complexity. They are often preferred for non-nested model comparison and for prediction-focused tasks.

Can adjusted R² be negative?

Yes. Because the factor (n−1)/(n−p−1) is greater than one whenever the model has predictors, adjusted R² is never larger than R² and can fall below zero. A strongly negative value signals a poor fit or a severely overparameterized model relative to the sample size.

How much improvement in adjusted R² justifies adding a new predictor?

No universal threshold exists. Decisions should be guided by the size of the change in adjusted R², the F-test for nested models, and domain knowledge.

Does adjusted R² work for logistic or non-linear regression?

The formula is specific to linear regression fitted by ordinary least squares. Logistic and other non-linear models need different fit measures. For these, information criteria (AIC, BIC) or cross-validation are generally more suitable than adjusted R².

Why does adjusted R² sometimes go down when I add a variable?

The adjustment depends on both the number of predictors and the sample size. If the gain in R² is small, or if p is large relative to n, the increase in the factor (n−1)/(n−p−1) can outweigh the improvement in fit. This can happen even when the new predictor is statistically significant.

Related methods

Sources

  1. Theil, H. (1961). Economic Forecasts and Policy. Amsterdam: North-Holland Publishing Company.

    Open publication reference
  2. Ezekiel, M. (1930). Methods of Correlation Analysis. New York: John Wiley & Sons.

    Open publication reference
  3. Judge, G. G., Griffiths, W. E., Hill, R. C., Lütkepohl, H., & Lee, T. C. (1985). The Theory and Practice of Econometrics. New York: John Wiley & Sons.

    ISBN: 978-0471050773