I’m exploring variational inference in stan. I tried fitting a model using vb function. It runss with the default “meanfield” algorithm, but the results aren’t ideal. I then tried to use “fullrank”, but everytime I do that, my R session will crash and force restart.
Here I enclose my stan code as well as r code to run the data.
I think @bgoodri released an RStan patch on CRAN (v2.21.2) that might fix this (I don’t know but could be worth a try), but one way to run VB without crashing R is to use the new the new CmdStanR interface (as I just suggested over in this thread: R Session Aborted). With CmdStanR you might still get errors if the VB algorithm encounters errors but it shouldn’t crash your R session.
Great, definitely let us know if you run into any trouble with CmdStanR. And if you’re willing, let us know if you don’t run into trouble (we like to know that it’s working properly!).