Extending a non-converged run?

Hi, this is a general question. Suppose I set rstan to run 3000 iterations. I then check the trace plot and R_hat, and find that I have not achieved convergence. Is there a simple way to continue or extend my previous run? So if I run another 3000 iterations, it is the same as me setting to run 6000 iterations from the beginning. Thank you.

No, but if it doesn’t converge with the default number of iterations, it probably never will and there is something about your model that is either or wrong or makes it very difficult for Stan to draw from its posterior distribution.

Thanks. I will consider tighter priors.

Ben, one thing that has been on my mind lately is that it would be good to have early warning concerning divergences. If I run something for 24 hours then I don’t want to see divergent transitions that popped up the first hour - or isn’t it possible to monitor this dynamically? Having a warning message coming up during sampling would allow me to Ctrl-C and instead focus on what’s wrong with my model.

1 Like

If you use RStan, it should be ignoring divergent transition warnings from the warmup period. Unfortunately, there are basically always divergent transitions during warmup, especially when it switches from one window to another, so seeing them would not really tell you anything about whether there are going to be intractable divergent transitions after warmup.