Yes, you first need to make a prediction using the predict_goals() function. To inspect it more closely, i prefer to plot it using ggplot2. If you use the function with return_df=TRUE, you get a data.frame with the probabilities that you can use with ggplot2. Here is a quick draft of how the code could look like. I havent run this exact code myself, so it might not work, but is should give you an idea on how to do it.

my_pred_df <- predict_goals(... ... ... , return_df=TRUE) ggplot(my_pred_df, aes(x = goals1, y = goals2, color = probability, label = probability)) + geom_tile() + geom_text() You may need to do something extra steps to round the displayed probabilities to only 2 decimals or something, and maybe also not display goals > 5 or something.

]]>https://www.sbo.net/strategy/football-prediction-model-poisson-distribution/ ]]>

Im sorry, I cant help you. I don’t use matlab and I am therefore not familiar with the libraries avalable for that. Maybe it can be possible to convert the parameter estimates you get to probabilities, for example using the softmax formula or something else. But again, I am not familiar with that library and I am not completely confident that the softmax approach is valid.

]]>I am not a statistician, but for a behavioural study, I faced the very same issue. As you mentioned, the problem is that the ratings are not uniquely determined. When I started reading about the Bradly-Terry model, I expected that the some-to-one constraints be part of the algorithm itself. But apparently, since the final usage is to predict individual comparison (which can be obtained from p (r in your notation) values) it has not been incorporated in the original method.

For my analysis, I am using the Matlab library by Florian Wickelmaier & Christian Schmid (2004). Do you know of any Matlab library that has implemented the sum-to-one constraint? Or can you guide me how I can embed it the code I mentioned above?

Thanks,

]]>I also got the error when trying to process two leagues at once. It could have been that there is a workaround.

]]>Yes you can do that, but it might give you an error. If you just give data from to separate leagues it wont work, unless you have some data to “bridge” the two leagues, such as data from the champions league.

]]>Regards ]]>

Thanks, I hadn’t seen that.

]]>Yes, to use decimal numbers, set model = ‘gaussian’ when you use the goalmodel function. More information here:

https://github.com/opisthokonta/goalmodel#the-gaussian-model

]]>