Burn or adapt?

522 views
Skip to first unread message

Mike Meredith

unread,
Dec 29, 2016, 8:15:40 PM12/29/16
to hmecology: Hierarchical Modeling in Ecology
If you are using jagsUI::jags, you should probably be using the n.adapt argument more, as the default value (100) is too small for all but the simplest models.

During adaptation, the sampler parameters, eg, step size for a random-walk sampler, are tuned to give good mixing. Too little tuning does not affect the validity of the MCMC chain, but does give poor mixing, with high autocorrelation and low effective sample size.

In WinBUGS and OpenBUGS, the first part of the burn-in phase was used for adaptation, and tuning was turned off when internal criteria were met. The point of burn-in is to move away from the arbitrary starting values, and that also happens during adaptation. The only time we noticed adaptation was when burn-in was insufficient for adaptation to complete, and we could not set monitors.

JAGS has a separate adaptation phase, which is skipped if samplers do not need tuning, and the user decides how many iterations to use for adaptation.

With R2jags::jags, the entire burn-in phase is passed to JAGS as an adaptation phase. That makes sense if adaptation is necessary, but if JAGS skips adaptation we get no burn-in!

jagsUI::jags has separate arguments for n.adapt and n.burnin, but I suspect most users are like me and plug in thousands of iterations for n.burnin and leave the default for n.adapt = 100. We would get much better mixing if we used thousands of iterations for n.adapt and none for post-adaptation burn-in. But we'd have to check the trace plots (as we always do...) to pick up the cases where adaptation was skipped and burn-in is needed.

There's more on this issue at my web site here.


Reply all
Reply to author
Forward
0 new messages