Learn R Programming

EpiNow2 (version 1.7.1)

stan_vb_opts: Stan Variational Bayes Options

Description

[Stable] Defines a list specifying the arguments passed to rstan::vb() or cmdstanr::variational(). Custom settings can be supplied which override the defaults.

Usage

stan_vb_opts(samples = 2000, trials = 10, iter = 10000, ...)

Value

A list of arguments to pass to rstan::vb() or cmdstanr::variational(), depending on the chosen backend.

Arguments

samples

Numeric, default 2000. Overall number of approximate posterior samples.

trials

Numeric, defaults to 10. Number of attempts to use rstan::vb()] before failing.

iter

Numeric, defaulting to 10000. Number of iterations to use in rstan::vb().

...

Additional parameters to pass to rstan::vb() or cmdstanr::variational(), depending on the chosen backend.

Examples

Run this code
stan_vb_opts(samples = 1000)

Run the code above in your browser using DataLab