Hello everyone,
Since a few weeks I have started to learn Stan through rstan. I am working with ordinal variables and therefore with ordinal regression models. I am still getting familiar with the language and output of this software.
I have a question about the execution time of each chain using rstan. I have run a very simple ordinal model, such as the one found in Stan User’s Guide. To do this, I run, in parallel, 5 chains of 1500 simulations, 500 of burnin (warmup) and 5 of thin. Of course I use 5 cores out of 8 available on my laptop (checked with htop with Linux terminal). Therefore, I keep 200 simulations per chain, that is, 1000 simulations in total for each parameter of interest.
My question is about the different times that each chain has. When I run 5 chains, it seems like they usually finish 3 of them at the same time, and after a while, the other 2 remaining chains finish, also around the same time. It seems strange to me, with WinBUGS (the only Bayesian inference software I’ve ever used) they usually finish, approximately, all at the same time. In Stan, when the first 3 are done, there are still quite a few simulations of the remaining 2 chains to perform, as the output of rstan::stan() indicates. However, if I run only 3 chains for 3 cores, they do all terminate at once. The problem starts when I ask for 5 chains for 5 cores.
I have left the parameters of the rstan::stan() function by default and used the no-U-turn sampler (NUTS) algorithm. I have to say that the convergence, in any scenario of the number of chains, is very good, both in the effective number of simulations (there does not seem to be any type of autocorrelation problem) and Rhat (I declare a sufficient burnin). In fact, the traceplots indicate that the burnin could be greatly reduced, but I wanted to ensure a good diagnostic analysis of the model. I want to make this clear because I have seen that many recommendations are given by diagnostic problems, difficulty in simulation, but that does not seem to be my reason.
Is this common in Stan? Do I have to change any parameter, of those that I have left by default, of the rstan::stan() function? I am a bit confused. I thank you in advance for your help.