# First iteration in MCMC coda chain is different from initial values

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).

• @JackTanner the "GS" in 'BUGS' and 'JAGS' stands for Gibbs Sampling. If by 'Metropolis step' you mean the part in Metropolis-Hastings where the proposed move may or may not be accepted, Gibbs Sampling has no Metropolis step since its $\alpha$ ratio is (by design) always exactly 1. – Glen_b Aug 28 '13 at 0:13
• JAGS does not have a burn-in parameter that I know of; it does have an adaptation parameter (called n.adapt in rjags). – Jack Tanner Nov 30 '12 at 19:14