CmdStanMCMC
Objectsextract_chkpt_draws.Rd
A convenience function for extracting the draws from a
CmdStanMCMC
object.
extract_chkpt_draws(object, phase)
An object of class CmdStanMCMC
.
Character string. Which phase during checkpointing?
The options included warmup
and sample
.
The latter extracts the draws with
inc_warmup = FALSE
, which is the default in
draws
A 3-D draws_array
object
(iteration x chain x variable).
This can be used to extract the draws in general by setting
phase = "sample"
which then only includes the post-warmup
draws.
if (FALSE) {
library(cmdstanr)
# eight schools example
fit_schools_ncp_mcmc <- cmdstanr_example("schools_ncp")
drws <- extract_chkpt_draws(object = fit_schools_ncp_mcmc,
phase = "sample")
# compare to cmdstanr
all.equal(drws, fit_schools_ncp_mcmc$draws())
}