# Modelling for soccer scores

In Dixon, Coles (1997), they have used the maximum likelihood estimation for the two modified independent Poisson models in (4.3) to model the scores in soccer.

I am trying to use R in order to "reproduce" the alpha and beta as well as the home effect parameters (pg. 274, Table 4) without using any packages (using the usual independent Poisson models are fine too). I have tried using bivpois package but I am not sure on how to modify its parameters.

I would greatly appreciate it if anyone can help me with the R code to model the data - Scores from the home and away team for Season 2012/13 in English Premier League.

• Basically, you want someone to code up equation 4.5 (though you say 4.3) from that paper for use in R's optim command? Isn't Stack Overflow the place to ask questions like that?
– Bill
Oct 9, 2013 at 14:59
• @SooBin, I would be interested to know how applicable this method still is, having read through it a while ago. Nov 17, 2013 at 9:39

The paper you are reading is implicitly using $\alpha_i$ and $\beta_i$ to refer to the attack and defense parameters as described by Maher (1982).

The main difference is that Maher uses four parameters for each team (home attack, home defense, away attack and away defense) while Dixon and Coles use attack and defense parameters and another parameter to represent home advantage.

The MLE for the Poisson distribution is simply: $\lambda_{MLE}= \frac{1}{n} \sum_{i=1}^n k_i$

.. as far as reproducing their alterations to the Poisson distribution (a quick look tells me it has become both time-dependent and bivariate), I doubt anyone will do that for you. You're way better off using tools that actually make sense.

• Welcome to the site, @dumdidum . Simply saying "tools that actually make sense" is not enough for an answer. If you could say a) Why the Dixon Coles tools don't make sense and b) What tools would make sense then this would be a good answer. Otherwise, it should be a comment. Oct 9, 2013 at 12:31
• @dumdidum I do know the MLE for a poisson distribution, but I am just wondering of the way to estimate the alpha and beta as well as the home parameters in (4.4). Thanks for the reply. Oct 9, 2013 at 12:42
• I agree with Peter - it seems to me that this is intended as an answer, but could you please expand on your answer, to make it more complete? Apr 19, 2014 at 5:54

You don't need bivariate Poisson. You can define your own function, and then use a generic optimization script like optim.

You are feel free to refer to bivpois R package. My previous project applied diagonal bivariate poison. as you can refer to https://github.com/scibrokes/odds-modelling-and-testing-inefficiency-of-sports-bookmakers.