What is the exact formula used in R lm()
for the Adjusted R-squared? How can I interpret it?
Adjusted r-squared formulas
There seem to exist several formulas to calculate Adjusted R-squared.
- Wherry’s formula: $1-(1-R^2)\frac{(n-1)}{(n-v)}$
- McNemar’s formula: $1-(1-R^2)\frac{(n-1)}{(n-v-1)}$
- Lord’s formula: $1-(1-R^2)\frac{(n+v-1)}{(n-v-1)}$
- Stein's formula: $1-\big[\frac{(n-1)}{(n-k-1)}\frac{(n-2)}{(n-k-2)}\frac{(n+1)}{n}\big](1-R^2)$
Textbook descriptions
- According to Field's textbook, Discovering Statistics Using R (2012, p. 273) R uses Wherry's equation which "tells us how much variance in Y would be accounted for if the model had been derived from the population from which the sample was taken". He does not give the formula for Wherry. He recommends using Stein's formula (by hand) to check how well the model cross-validates.
- Kleiber/Zeileis, Applied Econometrics with R (2008, p. 59) claim it's "Theil's adjusted R-squared" and don't say exactly how its interpretation varies from the multiple R-squared.
- Dalgaard, Introductory Statistics with R (2008, p. 113) writes that "if you multiply [adjusted R-squared] by 100%, it can be interpreted as '% variance reduction'". He does not say to which formula this corresponds.
I had previously thought, and read widely, that R-squared penalizes for adding additional variables to the model. Now the use of these different formulas seems to call for different interpretations. I also looked at a related question on Stack Overflow (What is the difference between Multiple R-squared and Adjusted R-squared in a single-variate least squares regression?), and the Wharton school's statistical dictionary at UPenn.
Questions
- Which formula is used for adjusted r-square by R
lm()
? - How can I interpret it?
ans$adj.r.squared <- 1 - (1 - ans$r.squared) * ((n - df.int)/rdf)
, where ans$r.squared = R^2; n = n, rdf = residual df, df.int = intercept df (0 or 1). $\endgroup$