as_draws.CmdStanMCMC | R Documentation |
draws
object from a CmdStanR fitted model objectCreate a draws
object supported by the posterior package. These
methods are just wrappers around CmdStanR's $draws()
method provided for convenience.
## S3 method for class 'CmdStanMCMC'
as_draws(x, ...)
## S3 method for class 'CmdStanMLE'
as_draws(x, ...)
## S3 method for class 'CmdStanLaplace'
as_draws(x, ...)
## S3 method for class 'CmdStanVB'
as_draws(x, ...)
## S3 method for class 'CmdStanGQ'
as_draws(x, ...)
## S3 method for class 'CmdStanPathfinder'
as_draws(x, ...)
x |
A CmdStanR fitted model object. |
... |
Optional arguments passed to the |
To subset iterations, chains, or draws, use the
posterior::subset_draws()
method after creating the draws
object.
## Not run:
fit <- cmdstanr_example()
as_draws(fit)
# posterior's as_draws_*() methods will also work
posterior::as_draws_rvars(fit)
posterior::as_draws_list(fit)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.