model {
  for (i in 1:n) {
     predcones[i] <- exp(a+b*DBH[i])
     ## model cones as Poisson-gamma mixture
     gammarate[i] <- k/predcones[i]
     prob[i] ~ dgamma(k,gammarate[i])
     cones[i] ~ dpois(prob[i])
  }
a ~ dnorm(0,0.01)
b ~ dnorm(0,0.01)
k ~ dunif(0.1,5)
}
