I am fairly new to JAGS and I am using the jags() function from the package R2jags to run some occupancy models. However, the output from jags() in terms of effective sample size is different from what I get from using effectiveSize() from the coda package. For instance, for a given model I get:
> ( outNull <- jags(jdataNull, NULL, wanted, "2methods_null_weasel.jags", DIC=TRUE,
n.burnin = 1000, n.iter=1001000, n.thin=100, n.chains=3) )
Inference for Bugs model at "2methods_null_weasel.jags", fit using jags,
3 chains, each with 1001000 iterations (first 1000 discarded), n.thin = 100
n.sims = 30000 iterations saved
mu.vect sd.vect 2.5% 25% 50% 75% 97.5% Rhat n.eff
pC 0.499 0.116 0.274 0.418 0.500 0.580 0.722 1.001 30000
pM 0.499 0.116 0.274 0.418 0.500 0.580 0.722 1.001 30000
psi 0.462 0.227 0.137 0.276 0.417 0.621 0.946 1.001 12000
theta 0.064 0.040 0.017 0.034 0.053 0.083 0.169 1.001 17000
deviance 100.068 3.477 92.857 98.030 100.212 102.116 107.022 1.001 30000
> effectiveSize(outNull)
deviance pC pM psi theta
30000.00 31559.36 31559.36 28103.50 29471.97
Not only are the values quite different from n.eff, but the output from effectiveSize() has more samples than the number of iterations ran, for some of the parameters.
Does anyone know why this happens and which value is "correct"?
Thank you so much!!