I use both packages in order to do Bayesian analysis but there are some differences that I don't understand:
First of all the package rjags
allows the adaptation phase, with the jags.model
function, while the package r2jags
does not have this phase, and with the function jags
(or jags.parallel
) begin to sample from the posteriori distribution. Is the adaptive phase included in that function, or the package r2jags
does not consider it?
Secondly, in rjags
, could I say that these two chunks of code are similar?
jmod <- jags.model(file="somefile.txt", data = data, n.chains=3)
update(jmod,100)
jsample <- coda.samples(jmod, n.iter=100, variable.names=par)
and
jmod <- jags.model(file="somefile.txt", data = data, n.chains=3)
jsample <- coda.samples(jmod, n.iter=200,n.burnin=100, variable.names=par)
that is, the burn-in phase with update
function can be also done in coda.samples
function? Thank you.