I am sending my Stan scripts to run on a supercomputer. However, I don’t know how to estimate how much time will the supercomputer require for computation (which is one of the parameters you need to pass to the supercomputer) and so I am often timed out. Therefore, I would like to make my code so that it saves the results of the estimation after each, say, 1000 iterations and then passes these yet incomplete estimates as initial values for the next iterations. That way, if I am timed out, I will at least have access to the calculations that were done until then and I will be able to start the estimation again from where it stopped.
However, I am trying to find a way to pass the results of the previous computations as initial values for the further computations. Simply passing the fit object to the
init argument of the
stan functions does not work, nor does passing the summary of the fit object. How can I ‘reshape’ the fit object so that its estimates can be used as initial values for further computations?