View source: R/extract_chkpt_draws.R
extract_chkpt_draws | R Documentation |
CmdStanMCMC
ObjectsA convenience function for extracting the draws from a
CmdStanMCMC
object.
extract_chkpt_draws(object, phase)
object |
An object of class |
phase |
Character string. Which phase during checkpointing?
The options included |
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.
## Not run: 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()) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.