https://github.com/torvaney/regista
An R package for soccer modelling
https://github.com/torvaney/regista
football r rstats soccer sports-analytics
Last synced: 5 months ago
JSON representation
An R package for soccer modelling
- Host: GitHub
- URL: https://github.com/torvaney/regista
- Owner: Torvaney
- License: gpl-3.0
- Created: 2018-04-24T22:11:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-02T11:16:38.000Z (over 4 years ago)
- Last Synced: 2025-04-06T17:11:18.870Z (6 months ago)
- Topics: football, r, rstats, soccer, sports-analytics
- Language: R
- Homepage: https://torvaney.github.io/regista/
- Size: 361 KB
- Stars: 87
- Watchers: 6
- Forks: 8
- Open Issues: 12
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
---
output:
github_document:
html_preview: false
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```# regista
[](https://travis-ci.org/Torvaney/regista)
[](https://ci.appveyor.com/project/Torvaney/regista)
[](https://codecov.io/github/Torvaney/regista?branch=master)
[](https://www.tidyverse.org/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:
```{r, eval = FALSE}
# install.packages("devtools")
devtools::install_github("torvaney/regista")
```## Examples
### Dixon-Coles
The ["Dixon-Coles model"](http://web.math.ku.dk/~rolf/teaching/thesis/DixonColes.pdf) is a modified poisson model, specifically designed for estimating teams' strengths and for predicting football matches.
Regista provides an implementation of this model:
```{r, message = FALSE, warning = FALSE}
library(regista)fit <- dixoncoles(hgoal, agoal, home, away, data = premier_league_2010)
print(fit)
```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:* [Modelling the World Cup with regista](http://www.statsandsnakeoil.com/2018/06/05/modelling-the-world-cup-with-regista/)
* [Dixon Coles and xG: together at last](http://www.statsandsnakeoil.com/2018/06/22/dixon-coles-and-xg-together-at-last/)
* [What a diff'rence xG makes](http://www.statsandsnakeoil.com/2018/07/15/what-a-diff-rence-xg-makes/)Other options
---* The [mezzala](https://github.com/Torvaney/mezzala) package provides similar functionality for Python.
* The [goalmodel](https://github.com/opisthokonta/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.