model{ for(i in 1:M){ q[i] <- 1/i } N ~ dcat(q[]) for(i in 1:M){ p.unif[i] <- step(N-i+0.1) } y ~ dcat(p.unif[]) ynew ~ dcat(p.unif[]) }