fit-method-output | R Documentation |
For MCMC, the $output()
method returns the stdout and stderr
of all chains as a list of character vectors if id=NULL
. If the id
argument is specified it instead pretty prints the console output for a
single chain.
For optimization and variational inference $output()
just pretty prints
the console output.
output(id = NULL)
id |
(integer) The chain id. Ignored if the model was not fit using MCMC. |
CmdStanMCMC
, CmdStanMLE
, CmdStanVB
, CmdStanGQ
## Not run:
fit_mcmc <- cmdstanr_example("logistic", method = "sample")
fit_mcmc$output(1)
out <- fit_mcmc$output()
str(out)
fit_mle <- cmdstanr_example("logistic", method = "optimize")
fit_mle$output()
fit_vb <- cmdstanr_example("logistic", method = "variational")
fit_vb$output()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.