I am trying to perform a Bayesian analysis using this model y ∼ Pois(λ) λ∼ Ga (10, 1) but getting a run time error:

```
y = c(10, 8, 8, 11, 7,5, 9, 8, 7, 8, 13, 11, 7, 9, 6, 10, 8, 9, 7, 9)
data = list(y = y, n = length(y))
init = list(mu = 1)
modelstring = "
model {
for(i in 1 : n){
y[i] ~ dpois(mu,1)
mu <- n*lambda
}
lambda ~ dgamma(0, 1 / 10)
}
"
model = jags.model(textConnection(modelstring), data = data, inits = init, n.chains = 2, n.adapt = 1000)
```

```
Error in jags.model(textConnection(modelstring), data = data, inits = init, :
RUNTIME ERROR:
Incorrect number of parameters in distribution dpois
```