0

I am fitting a Bradley Terry model to Premier League season 2018-2019 and I am looking to incorporate variables to the basic model. I already put in the Home Advantage but do not know how to add other variables, for example the change in manager. Has anyone done that before? Or is familiar with Bradley Terry models?

Thank you in advance for your answers.

Phil
  • 7,287
  • 3
  • 36
  • 66
e_hnr
  • 1
  • Hi e_hnr, welcome to SO. It would be great help if you could provide a reproducible example. You can find all means to do so [here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – cbo Mar 18 '20 at 16:58
  • @cbo PL <- data.frame(HomeTeam=data$HomeTeam , AwayTeam=data$AwayTeam , HomeTeamGoals=data$FTHG , AwayTeamGoals=data$FTAG) draws PL<-subset(PL, HomeTeamGoals!=AwayTeamGoals) basic model PL_basic <- BTm(cbind(HomeTeamGoals, AwayTeamGoals), HomeTeam, AwayTeam, data=PL, id="team") at.home PL$HomeTeam <- data.frame(team=PL$HomeTeam,at.home=1) PL$AwayTeam <- data.frame(team=PL$AwayTeam,at.home=0) PL_at.home <- update(PL_basic, formula. = ~ team + at.home) the dataset: https://datahub.io/sports-data/english-premier-league#resource-season-1819 – e_hnr Mar 18 '20 at 17:54
  • Nice, could you edit your question quoting your code with the symbol ``` ? That way everyone can directly see it. For your code it would be easier to share using `dput(head(data, 100))` for example. – cbo Mar 19 '20 at 08:35

0 Answers0