Defines a list specifying the arguments passed to underlying stan
backend functions via stan_sampling_opts() and stan_vb_opts(). Custom
settings can be supplied which override the defaults.
A <stan_opts> object of arguments to pass to the appropriate
rstan functions.
Arguments
object
Stan model object. By default uses the compiled package
default if using the "rstan" backend, and the default model obtained using
epinow2_cmdstan_model() if using the "cmdstanr" backend.
samples
Numeric, defaults to 2000. Number of posterior samples.
method
A character string, defaulting to sampling. Currently supports
MCMC sampling ("sampling") or approximate posterior sampling via
variational inference ("vb") and, as experimental features if the
"cmdstanr" backend is used, approximate posterior sampling with the
laplace algorithm ("laplace") or pathfinder ("pathfinder").
backend
Character string indicating the backend to use for fitting
stan models. Supported arguments are "rstan" (default) or "cmdstanr".
return_fit
Logical, defaults to TRUE. Should the fit stan model be
returned.
...
Additional parameters to pass to underlying option functions,
stan_sampling_opts() or stan_vb_opts(), depending on the method