Backend based on variational approximation via cmdstanr.

SBC_backend_cmdstan_variational(model, ..., n_retries_init = 1)

## Arguments

model

an object of class CmdStanModel (as created by cmdstanr::cmdstan_model)

...

other arguments passed to the \$variational() method of the model. The data argument cannot be set this way as they need to be controlled by the SBC package.

n_retries_init

number of times to retry the variational fit if the algorithm has trouble initializing (e.g. too many dropped evaluations (see https://discourse.mc-stan.org/t/advi-too-many-dropped-evaluations-even-for-well-behaved-models/24338), or "cannot compute ELBO using the initial variational distribution")