I am also wondering if dixon coles model can apply to half time result? Should we have different tau function as the goal distribution is quite different from that for full time result?

]]>In the expg_from_probabilities function in the goalmodel package you can set rho youself, but at the moment it cant find rho from a set of odds from a single match. You can however try to tweak rho using odds from several matches.

https://github.com/opisthokonta/goalmodel

Say we have 3 different odds on hand, under-over-1.5/under-over-2.5/home-draw-away and then solve the system of equations using DC(E)=implied prob(E), where E=under-1.5/under-2.5/draw. In this way we should get lambda, mu, rho solved.

What is your opinion?

Btw, do you have any thought that related to expected goal, xG?

]]>indeed, I didn’t duplicate the weights, and that was the problem. Thanks for your help!

]]>First of all, thank you very much for your work and for sharing your knowledge with us.

I have implemented a Poisson Model using you example http://opisthokonta.net/?p=296 and wondering if I can apply DCweights to it? I have a feeling it is possible because I see you can do it using your goalmodel package:

gm_res_w <- goalmodel(

goals1 = england_2011$hgoal,

goals2 = england_2011$vgoal,

team1 = england_2011$home,

team2=england_2011$visitor,

weights = my_weights

)

But I don't understand where to pass them. I thought I need to pass them to the glm function like this

glm(

goals ~ home + team + opponent,

family = poisson(link = log),

data = goal_model_data,

weights = my_weights

)

but it throws an error

Error in model.frame.default(formula = goals ~ home + team + opponent: invalid type (closure) for variable '(weights)'.

Could you please help me to understand how to use weights with the independent Poisson Model? Or it's only possible to do it with DC approach?

Thanks in advance!

]]>You can see a detailed description of the basic structure of all the models, including the Dixon-Coles model, in this section of the readme: https://github.com/opisthokonta/goalmodel#the-default-model

]]>Its just a matter of multiplying the weights with each term in the (negative) log-likelihood (dc_negloglik() in the “simple implementation”) before you sum them.

]]>