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:

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:

The Dixon-Coles model provides estimates of each team’s offensive and defensive strength, along with an estimate of home-field advantage (hfa):

Regista also comes with a predict method, to predict the goalscoring rate of either team, or the probabilities of different possible scorelines or match outcomes:

The regista package is designed to work fluidly with the tidyverse and tidy principles. For instance, predictions can be handled easily with the broom package.

To get predictions of Home/Draw/Away probabilities as columns in a dataframe, you can use the broom::augment function:

Or to get model parameters in a table format:

(Note that team parameter estimates are in log space).

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

There are some more extensive examples and analyses using regista available at the following links:

Other options

  • 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.