How to implement rounding in BUGS in a survey context? In a traditional filtering context, you'd analyse polls coming in with something like
mu[i] <- alpha[date[i]]
prec[i]<- SampleSize[i]/(alpha[date[i]]*(1-alpha[date[i]])
y[i] ~ dnorm(mu[i],prec[i])

If the surveys are observed with rounding, this usually won't make a difference. But I'm in a situation where it does. What would be a good way to handle the observations being rounded in BUGS code?
 A: No promises about the computational efficiency of this solution, but the best way to take into account rounding to the nearest integer in JAGS is to use the dinterval "distribution".  The JAGS manual includes this passage:

The dinterval distribution represents interval-censored data. It has
  two parameters: t the original continuous variable, and c[], a vector
  of cut points of length M, say. If X ∼ dinterval(t, c) then X=0 if t <
  c[1]; X=m if c[m] ≤ t < c[m+1] for 1 ≤ m < M; X=M if c[M] ≤ t.

Assuming your polls are rounded to the nearest integer, you want to form a vector of cutpoints "roundingcutpoints" with values 0, 0.5, 1.5, 2.5, ..., 99.5,
100.  Then you model t as if it was the continuous polling data.  So, modifying your code:
mu[i] <- alpha[date[i]]
prec[i] <- SampleSize[i]/(alpha[date[i]]*(1-alpha[date[i]])
ystar[i] ~ dnorm(mu[i],prec[i])
y[i] ~ dinterval(ystar[i],roundingcutpoints)

A: I think something like:
mu[i] <- alpha[date[i]]
prec[i]<- SampleSize[i]/(alpha[date[i]]*(1-alpha[date[i]])
e[i] ~ dunif(-0.5,0.5)
mu.round[i] <- mu[i] + e[i]
y[i] ~ dnorm(mu.round[i],prec[i])

would do the job.  The e[i] represent the difference between the observed (rounded) and true value of y[i].  
What we'd like to do, for clarity, is adjust the observation by: 
y.true[i] <- y[i] - e[i]
y.true[i] ~ dnorm(mu[i], prec[i])

which certainly won't work in JAGS, but may in BUGS (which I don't have).  Instead, I'm adding e[i] to the right hand side of both lines of the above, which means it gets added to mu[i], and this allows us to work with the observed data directly.
