Adjusted R-squared
Definition taught in Regression examples, part of Data analysis
Adjusted R-squared
| Type | Definition |
| Taught in | Regression examples |
| Part | Data analysis |
| Worked examples | 1 |
For a regression with p explanatory variables on n observations, the adjusted R^2 is
R^2_{\mathrm{adj}}=1-(1-R^2)\frac{n-1}{n-p-1}.
Examples
Height, shoe size and weight
Worked example from Regression examples
Question. Add weight to the regression of height on shoe size, and interpret both coefficients.
Solution.
model2 <- lm(height ~ shoe + weight, data = survey)
summary(model2)
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) 132.2677 5.2473 25.207 < 2e-16 ***
# shoe 0.5304 0.1962 2.703 0.0081 **
# weight 0.3744 0.0572 6.546 2.82e-09 ***
# Residual standard error: 7.785 on 97 degrees of freedom
# Multiple R-squared: 0.4301, Adjusted R-squared: 0.4184
# F-statistic: 36.61 on 2 and 97 DF, p-value: 1.429e-12
confint(model2)
# 2.5 % 97.5 %
# (Intercept) 121.8533072 142.6821199
# shoe 0.1410087 0.9198251
# weight 0.2608887 0.4879514Among students of the same weight, one more centimetre of shoe goes with 0.53 cm more height on average (p=0.008); among students with the same shoe size, one more kilogram goes with 0.37 cm more height (p=3\times10^{-9}). The shoe-size coefficient has roughly halved from the simple regression, because shoe size and weight are themselves related: part of what shoe size “explained” alone is now credited to weight. Together the two variables account for 43% of the variation in height, up from 18%, and the residual standard error falls from 9.3 to 7.8 cm. The adjusted R^2, 0.418, is barely below R^2, so the gain is not an artefact of adding a parameter.
For a student with shoe size 30 cm and weight 75 kg, predict(model2, data.frame(shoe = 30, weight = 75), interval = "conf") gives a mean height of 132.27+0.5304\times30+0.3744\times75=176.3 cm, with 95% interval (174.2,\ 178.4).
Used in
- Taught in Regression examples, where the derivation and examples are.
- All 3 questions on Regression examples