Torvaney / regista

An R package for soccer modelling

Home Page:https://torvaney.github.io/regista/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

regista

Build Status AppVeyor Build Status Coverage status Lifecycle: experimental

Overview

regista is a package for performing some of the common modelling tasks in soccer analytics.

Installation

regista is not currently available on CRAN but can be downloaded from github like so:

# install.packages("devtools")
devtools::install_github("torvaney/regista")

Examples

Dixon-Coles

The “Dixon-Coles model” is a modified poisson model, specifically designed for estimating teams’ strengths and for predicting football matches.

Regista provides an implementation of this model:

library(regista)

fit <- dixoncoles(hgoal, agoal, home, away, data = premier_league_2010)

print(fit)
#> 
#> Dixon-Coles model with specification:
#> 
#> Home goals: hgoal ~ off(home) + def(away) + hfa + 0
#> Away goals: agoal ~ off(away) + def(home) + 0
#> Weights   : 1

A more flexible api is provided with dixoncoles_ext, which allows the base Dixon-Coles model to be extended arbitrarily.

vignette("using-dixon-coles") gives some simple examples for using the model. Additionally, there are more extensive examples and analyses using regista available at the following links:

Other options

  • The mezzala package provides similar functionality for Python.
  • The goalmodel R package contains an implementation of the Dixon-Coles model, along with some additional method for modelling the number of goals scored in sports games.

About

An R package for soccer modelling

https://torvaney.github.io/regista/

License:GNU General Public License v3.0


Languages

Language:R 100.0%