Error in ADVI (rstan)

I occasionally have the following errors when running vb() with my simulated data.

  • I do not specify the initial values when running vb(), which I think might raise this issue… What would you think? If that is the case, how could I set reasonable initial values (which would not cause this issue) when running vb()?

  • What could be other possible reasons?


Error in sampler$call_sampler(c(args, dotlist)) :
stan::variational::advi::adapt_eta: Cannot compute ELBO using the initial variational distribution. Your model may be either severely ill-conditioned or misspecified.


Thank you.

1 Like

Try with option init=0 which sets vereything to 0 in the unconstrained space or specify init as a list with desired values for each parameter.

Big data can cause over- or underflows even with optimal parameters if the model code is written to avoid that problem, advi computations may make that worse.