Description Usage Arguments Value
View source: R/with_mcmc_iter.R
Evaluate an expression on each iteration of Stan output. This makes it easier to post-process Stan output because the expression is evaluated with the parameters having the same dimensions as they do in the model.
1 2 3 4 5 6 7 8 | with_mcmc_iter(object, ...)
## S3 method for class 'stanfit'
with_mcmc_iter(object, expr, inc_warmup = FALSE,
data = list(), env = rlang::base_env(), ...)
## S3 method for class 'stanreg'
with_mcmc_iter(object, ...)
|
object |
An object. |
... |
Passed to other methods |
expr |
An expression to evaluate.
This uses |
inc_warmup |
A logical scalar indicating whether to include
the warmup draws. This argument is only relevant if |
data |
A list or environment with additional data to have in scope
when evaluating |
env |
The environment in which to evaluate |
A list with the output of expr
evaluated with each expression.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.