suyusung / R2jags

R2jags: Using R to Run 'JAGS'
8 stars 3 forks source link

Allow for burnin set to 0 #23

Closed giabaio closed 4 months ago

giabaio commented 4 months ago

I think if you haven't submitted to CRAN, this would be helpful --- the revised jags.R function basically doesn't allow for n.burnin=0, because the preliminary update step is based on setting the number of iterations for the warmup period to the selected n.burnin, which by default is positive, but if set to 0, will break the code.

I've changed to max(n.burnin, (n.iter/2)) so that if n.burnin is 0 the update stage still happens.