4.4 Home advantage by team

We might think that home advantage varies by team, if certain venues are particularly difficult to play in. Let’s see how much variation there is in home advantage. It will be more appropriate to do this in the context of regression later but for now we can look at score differential when a team is the home team, score differential when a team is the away team, and the difference between those.

Code
dh = d %>%
  mutate(diff = hscore - ascore) %>%
  group_by(home) %>%
  summarise(diff = mean(diff))

da = d %>%
  mutate(diff = ascore - hscore) %>%
  group_by(away) %>%
  summarise(diff = mean(diff))

head(dh)

dha = dh %>% 
  left_join(da, by=c('home'='away'), suffix=c('.h', '.a')) %>%
  mutate(diff = diff.h - diff.a) %>% 
  arrange(desc(diff))

head(dha)
# A tibble: 6 × 2
  home    diff
  <chr>  <dbl>
1 ATL    5.61 
2 BKN    1.94 
3 BOS    5.12 
4 CHA    0.701
5 CHI    0.494
6 CLE   -0.857
# A tibble: 6 × 4
  home  diff.h diff.a  diff
  <chr>  <dbl>  <dbl> <dbl>
1 GSW    7.70  -0.818  8.52
2 UTA   11.4    3.64   7.81
3 ATL    5.61  -1.78   7.39
4 WAS   -0.377 -4.94   4.56
5 PHX    8.92   4.51   4.42
6 LAC    5.09   0.714  4.38

There is some evidences of variation in home advantage among teams. We’ll do more testing of this later.