-
Notifications
You must be signed in to change notification settings - Fork 8
/
README.Rmd
71 lines (49 loc) · 2.58 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
output:
github_document:
html_preview: false
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
<!-- README.md is generated from README.Rmd. Please edit that file -->
# regista <img src="man/figures/logo.png" align="right" />
[![Build Status](https://travis-ci.org/Torvaney/regista.svg?branch=master)](https://travis-ci.org/Torvaney/regista)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/Torvaney/regista?branch=master&svg=true)](https://ci.appveyor.com/project/Torvaney/regista)
[![Coverage status](https://codecov.io/gh/Torvaney/regista/branch/master/graph/badge.svg)](https://codecov.io/github/Torvaney/regista?branch=master)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](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.