Here is an answer from Martyn Plummer:
As written, your model does not have any observed outcomes. You probably noticed that it runs really really fast. This is because it is forward sampling from the prior. That is why your posterior mean for mu is the same as the prior mean of 0. The variable name "is.censored" is appropriate for left- or right-censored data, as found in survival analysis, but not for your problem. So I'm going to rename it "y". If you have
y[j] ~ dinterval(t[j], lim[j,])
and lim[j] has two columns, then y[j] can take three possible values
y[j] = 0 if t[j] <= lim[j,1]
y[j] = 1 if lim[j,1] < t[j] <= lim[j,2]
y[j] = 2 if lim[j,2] < t[j]
To model interval censored data, you need to supply y[j] as data in your model. In your case, you know that t[j] always falls between lim[j,1] and lim[j,2] so your data should be.
data <- list("lim"=lim, "y"=rep(1,nrow(lim)))
The problem with DIC is fairly deep. Because your model does not have any outcome data, the deviance is not defined. However, even if you supply outcome data you will still not get the deviance statistics you want (including pD). The deviance will be zero and the "jags" function will fall back on the Gelman heuristic for pD (I did not write this so don't ask me to explain it), which will also be zero. The likelihood you really want is
p(lim[j,1] < t[j] <= lim[j,2] | mu, tau)
But JAGS is giving you
p(y[j] | t[j])
which is always 1. The "focus" of DIC is wrong. I don't know what WinBUGS does under these circumstances. Perhaps it has special rules for censored variables.
Best Answer
Short answer: The number of iterations incorporates the burn in and does not incorporate thinning.
Less short answer: If you were to run a BUGS model through R2WinBUGS or R2OpenBUGS (or view a summary of WinBUGS output) with the arguments you stated:
you would get an error message/no output.
n.iter
refers to the total number of iterations including the burn in, hence all your iterations are burn in and are thrown away (or not included in the CODA output and any ACF plot in WinBUGS).Thinning is treated differently (in relation to
n.iter
). For example if you set your MCMC up with any of the following arguments:only 1000 iterations will be saved, i.e. all non-thinned simulations are discarded (in CODA output or any ACF plot in WinBUGS).
Not sure if this is the same for jags?