inst/snippet/ncaa-bt04.R

require(BradleyTerry2)
# home team gets advantage unless on neutral court  
NCAA$homeTeam <- 
  data.frame(team = NCAA$home, at.home = 1 - NCAA$neutralSite)
NCAA$awayTeam <- data.frame(team = NCAA$away, at.home = 0)
NCAA.model2 <- 
  BTm(cbind(homeTeamWon, 1-homeTeamWon),
      homeTeam, awayTeam, id = "team", 
      formula = ~ team + at.home, data = NCAA)
rpruim/fastR documentation built on Nov. 12, 2023, 12:26 p.m.