I would like to run a Negative Binomial model with real (not integer) parameters. As a workaround, I created a simple Poisson-Gamma hierarchical model, but I get a compiler error:

"Error in node dpois(lambda)

Length mismatch in Node::setValue"

My model is

model

{

m ~ dpois(lambda)

lambda ~ dgamma(a, b)

a ~ dgamma(0.1, 1)

b ~ dgamma(0.1, 1)

}

And the data is

'm' <- c(0,0,5,2,3,24,26,4,3,6,12,36,22)

I start jags, and do "model in", "data in" and "compile", which leads to the above error.

I'm sure there's something I'm doing wrong or not understanding, but I just can't seem to fix it. Any help would be appreciated.