Other sites

Finishing football postings

For now this is the last post about these football data. It started in August, by now it is November. But just to finish up; the model as it should have been last week.

Model

As most of what I did is described last week, only the model as it went in Jags is shown.

Explanation: Each team has a total strength (TStr) and an attack/defense strength (AD). These combine to two numbers, Defense strength (DStr) and Attack strength (AStr). The attack strength against defense strength together determine the number of goals. Logically each team has one TStr, AD, DStr and Astr. In the model this is not so, Astr and Dstr are calculated for each game.

The intention was to build in strategy. If a team plays a much stronger/weaker team, it might be possible to shift in attack/defense strength. Unfortunately, that did not work. Either because it does not happen or because my formulation did not work out so good.

A second possibility possible in this framework is to incorporate statements like; team X never wins when they play at time Y. That could translate to a change in TStr depending on day and time. Maybe later.

fbmodel1

for (i in 1:N) {

HomeMadeGoals[i] ~ dpois(HS[i])

OutMadeGoals[i] ~ dpois(OS[i])

log(HS[i])

log(OS[i])

AstrH[i]

DstrH[i]

AstrO[i]

DstrO[i]

}

TStr[1]

AD[1]

for (i in 2:nclub) {

TStr[i] ~ dnormmix(MT,tauT1,EtaT)

AD[i] ~ dnormmix(MAD ,tauAD1, EtaAD)

}

for (i in 1:3) {

MT[i] ~ dnorm(0,.01)

MAD [i] ~ dnorm(0,.01)

tauT1[i]

tauAD1[i]

eee[i]

}

EtaT[1:3] ~ ddirch(eee[1:3])

EtaAD[1:3] ~ ddirch(eee[1:3])

sigmaT

tauT ~ dgamma(.001,.001)

sigmaAD

tauAD ~ dgamma(.001,.001)

Home ~ dnorm(0,.0001)

}

Results

As estimates for ADO Den Haag are now fixed, I am not sure any of the estimates can be interpreted as such. So, this is just to show the model runs through JAGS.

Inference for Bugs model at “C:/Users/…/Rtmp4uyOHL/model1be0596d2d4b.txt”, fit using jags,