I have my jags output object. In order to understand how MCMC coda chains work, I tried to see if first iteration in each MCMC chain is equal to the initial values supplied. And it is different! The initial value is not there! Is it an error?
Note that I specified burnin = 0 for this purpose.
How I ran jags:
inits = function () { list(
alpha = rnorm(no_crit, 0, 10000),
beta = rnorm(no_crit, 0, 10000)
,eps_tau = 7.9
,gamma_tau = 3.1
,delta_tau = 213
)
}
params = c("alpha", "beta", "eps_tau", "gamma_tau", "delta_tau")
ni <- 5000
nt <- 8
nb <- 0
nc <- 3
out <- R2jags::jags(win.data, inits, params, "model.txt",
nc, ni, nb, nt,
working.directory = paste(getwd(), "/tmp_bugs/", sep = "")
)
After the jags computation finished, I dumped the first iteration from each MCMC coda chain:
> mm = as.mcmc(out)
> mm[1, c("delta_tau", "eps_tau")]
> mm[1, c("delta_tau", "eps_tau")]
[[1]]
delta_tau eps_tau
4426.7716020 0.4825011
[[2]]
delta_tau eps_tau
4811.3174529 0.5240721
[[3]]
delta_tau eps_tau
4406.2672016 0.5351576
As you can see, the first iteration in all these chains is different from what I supplied as initial values (eps_tau = 7.9, delta_tau = 213).