Thomas R. Andresen
2013-05-02
Good day to you all!
I'm pretty fresh in this game of Bayesian stats, MCMC and JAGS. I'm currently working on some modelling of soccer results and have come across the following problem:
I have 6 vars that are all known a priori to be in the interval [0,1] and 1 var that is known a priori to be in the interval [0,>. They all need to be strictly positive!
passPrecision ~ dgamma(200, 1) aerialPrecision ~ dgamma(50, 1) contestPrecision ~ dgamma(25, 1) possessionPrecision ~ dgamma(100, 1) shotsPrecision ~ dgamma(0.05, 1) attackPrecision ~ dgamma(39, 1) defensePrecision ~ dgamma(39, 1) passSuccess[t, 1] ~ dnorm(0.78, passPrecision)T(0,1) aerialSuccess[t, 1] ~ dnorm(0.5, aerialPrecision)T(0,1) contestSuccess[t, 1] ~ dnorm(0.5, contestPrecision)T(0,1) possession[t, 1] ~ dnorm(0.5, possessionPrecision)T(0,1) shots[t, 1] ~ dnorm(10.51, shotsPrecision)T(0,) attackEff[t, 1] ~ dnorm(0.5, attackPrecision)T(0,1) defenseEff[t, 1] ~ dnorm(0.5, defensePrecision)T(0,1) passSuccess[t, s] ~ dnorm(passSuccess[t, (s-1)], passPrecision)T(0,1) aerialSuccess[t, s] ~ dnorm(aerialSuccess[t, (s-1)], aerialPrecision)T(0,1) contestSuccess[t, s] ~ dnorm(contestSuccess[t, (s-1)], contestPrecision)T(0,1) possession[t, s] ~ dnorm(possession[t, (s-1)], possessionPrecision)T(0,1) shots[t, s] ~ dnorm(shots[t, (s-1)], shotsPrecision)T(0,) attackEff[t, s] ~ dnorm(attackEff[t, (s-1)], attackPrecision)T(0,1) defenseEff[t, s] ~ dnorm(defenseEff[t, (s-1)], defensePrecision)T(0,1)
The model fails (offcourse) to run whenever a negative sample is drawn from any of the distributions. Above I have tried truncating the distributions by using the JAGS T(,) construct, but that results in samples that are strictly increasing (rather than being randomly drawn from the distribution). I have read the JAGS manual about censoring, but I don't quite get the idea. Any help is greatly appreciated.
Sincerely,
Thomas