library(tidyverse)
library(broom)
library(Stat2Data)
data("NFL2007Standings")
lm(WinPct ~ PointsFor, data = NFL2007Standings) %>%
glance()
## # A tibble: 1 x 11
## r.squared adj.r.squared sigma statistic p.value df logLik AIC BIC
## <dbl> <dbl> <dbl> <dbl> <dbl> <int> <dbl> <dbl> <dbl>
## 1 0.762 0.754 0.103 95.8 7.53e-11 2 28.3 -50.7 -46.3
## # … with 2 more variables: deviance <dbl>, df.residual <int>
lm(WinPct ~ PointsFor + PointsAgainst, data = NFL2007Standings) %>%
glance()
## # A tibble: 1 x 11
## r.squared adj.r.squared sigma statistic p.value df logLik AIC
## <dbl> <dbl> <dbl> <dbl> <dbl> <int> <dbl> <dbl>
## 1 0.884 0.876 0.0730 111. 2.60e-14 3 39.9 -71.9
## # … with 3 more variables: BIC <dbl>, deviance <dbl>, df.residual <int>
The \(R^2\) for the first model is 0.76. The adjusted \(R^2\) is 0.75.
The \(R^2\) for the second model is 0.88. The adjusted \(R^2\) is 0.876.
The second model is preferable.