Resume MCMC sampling from a previous run
dpmirt_resume.RdContinues MCMC sampling without recompilation, using the NIMBLE
Cmcmc$run(niter, reset = FALSE) pattern.
Value
A dpmirt_samples object with extended samples. Pass the
returned object to dpmirt_rescale before using fit methods
such as summary(), plot(), or dpmirt_estimates().
Details
Resume requires the original live compiled NIMBLE object; saved RDS objects
cannot restore compiled external pointers. Multi-chain fitted objects cannot
be continued with reset = FALSE; use reset = TRUE for a fresh
single-chain restart or rerun dpmirt.
See also
Other model fitting:
dpmirt(),
dpmirt_compile(),
dpmirt_fit-methods,
dpmirt_sample(),
dpmirt_spec()
Examples
if (FALSE) { # \dontrun{
# Continue from a previous fit for more iterations
fit <- dpmirt(sim$response, model = "rasch", prior = "normal",
niter = 5000, nburnin = 1000)
resumed <- dpmirt_resume(fit, niter_more = 5000)
fit2 <- dpmirt_rescale(resumed)
summary(fit2)
} # }