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)
if (FALSE) { # \dontrun{
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()
} # }