"Integrating multiple data sources in match-fixing warning systems" 
by Marius tting, Roland Langrock and Christian Deutscher

Main author of the code: Marius tting
Email for correspondence: marius.oetting@uni-bielefeld.de

We would like to thank Andreas Mayr for his support with the implementation of bivariate
distributions within the R-Package gamboostLSS.


The supplement contains four files for R-Code and four datasets. 

As we use data from betfair.com for which we do not have the rights, we provide artificial data
which is similar to the original data. More specifically, the betting volumes, the market values, the "certainty" covariate
and the Betfair betting odds are artificial.

The Code was tested in R (version 3.4.0) on Windows 7 with packages gamlss (version 5.0-1) and gamboostLSS (version 2.0-0).

The files should be executed in the order 1, 2, 3 as suggested by the file names. The file started with 0 only contains
functions which will be imported via source(). However, if you are only interested in a part of the analysis, each file can be executed separately. 
Thus, for example, one does not have to execute all estimations for both models to run the analysis of the outliers.


The following overview states which information of the manuscript can be found in the files:


First R-Code file: The file "0_PoissonMVlog.R" contains the families-object for the bivariate Poisson distribution used for estimations
within the gamboostLSS package. This families-object is loaded via the source-command in R at the beginning of the file 
"2_ScoringRatesModel_RCode.R".

Second R-Code file: The file "1_VolumeModel_RCode.R" contains all estimations regarding the betting volume model. The data
used in this file is "data_volumes.csv". This file also contains the code for generating Figures 1 and 2 and Tables 1 and 2 of the manuscript.

Third R-Code file: The file "2_ScoringRatesModel_RCode.R" contains all estimations regarding the odds model. The data used in
this file is "data_odds.csv". This file also contains the code for generating Figure 3 and Tables 3 and 4 of the manuscript.

Fourth R-Code file: The file "3_OutlierDetection_RCode.R" contains the outlier analysis. For that purpose, it is not necessary to run the
estimations from the previous to files. Instead, you find all the variables needed for the outlier analysis
in the files "data_outlier_volume.csv" and "data_outlier_odds.csv", which are read at the beginning of the Code. This file also contains
contains the code for generating Tables 5, 6 and 7 and Figure 4 of the manuscript.




