I am using cmdstanr, and would like to feed the outputs from a model back into a secondary run for that model.
Unfortunately, it seems like all of the output formats (eg $draws(), $summary etc) are in the “square brackets” format, not the shape that Stan wants for initial values.
I get this error when I try:
Error: 'init' contains entries with parameter names that include square-brackets, which is not permitted. To supply inits for a vector, matrix or array of parameters, create a single entry with the parameter's name in the init list and specify init values for the entire parameter container.
Is there any way to reshape the outputs into the correct format for initial values?
In this case study odraws1 comes from the optimization, but I hope you are able to modify to work with draws from the sampling (unfortunately I don’t have right now time to test the code with draws from sampling)