Hi,

I run my model with 2 chains and 100 samples/chain, using PyStan, on a remote machine. I get the following posterior draws for one of my parameters:

The prior is half-normal centered in 0.05 and with standard deviation 0.2.

However, when running the model on my local machine (with the same python environment as on the remote machine), with one chain and 100 samples, I get the following posterior, that looks very reasonable:

Can this be due to the initial conditions?

just an update. The fit on the remote machine improves significantly with a more informative prior (half-normal(0.02, 0.05))

No idea if there’s an issue with your local/remote machine.

Are these trace plots for 100 iterations? Initialization and priors can make a big difference, especially if the data itself isn’t super informative.

Yes, it can be due to random initializations if the model has regions which are stiff (i.e., hard to solve with a standard diff eq solver like the leapfrog integrator we use for the Hamiltonian dynamics). There can be a lot of variance across Stan runs, especially if you only look at 100 draws—it often takes longer to converge.

1 Like