In recent years, interest in predicting and modelling football matches has grown significantly. We introduce footBayes, an R package that simplifies the fitting, interpretation, and graphical exploration of frequentist and Bayesian football models using the statistical programming language Stan. The package supports several goal-based models, including Poisson models and their extensions with time-varying attack and defence parameters. The package allows users to incorporate external historical information on team strengths using ranking points (relative strengths) as additional covariates. A key feature is the implementation of a Bayesian Bradley-Terry-Davidson (BTD) model, which uses past match data to estimate historical team strengths information, that can be used as a further covariate to improve the predictive performance of goal-based models. Furthermore, footBayes supports both dynamic and static implementations of this model. The package also provides tools for graphically analysing a wide range of informative summaries and assessing model performance.
Fitting Bayesian and frequentist football models in R via the footBayes package
Leonardo Egidi;Roberto Macrí Demartino
2025-01-01
Abstract
In recent years, interest in predicting and modelling football matches has grown significantly. We introduce footBayes, an R package that simplifies the fitting, interpretation, and graphical exploration of frequentist and Bayesian football models using the statistical programming language Stan. The package supports several goal-based models, including Poisson models and their extensions with time-varying attack and defence parameters. The package allows users to incorporate external historical information on team strengths using ranking points (relative strengths) as additional covariates. A key feature is the implementation of a Bayesian Bradley-Terry-Davidson (BTD) model, which uses past match data to estimate historical team strengths information, that can be used as a further covariate to improve the predictive performance of goal-based models. Furthermore, footBayes supports both dynamic and static implementations of this model. The package also provides tools for graphically analysing a wide range of informative summaries and assessing model performance.Pubblicazioni consigliate
I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.


