Dear stan users and developers:

I am currently running a very simple experiment to generate some data from my proposed model with ‘known’ parameter values and then fit these generated data to the model to examine whether the model can recover the ‘known’ parameter values.

However, I got different sets of generated data(the data are generated in generated quantities block with normal_rng function and I supply ‘known’ mean and standard deviation in the data block) when simulating from my proposed model with ‘known’ parameters.

I set seed = 123456 within stan() command, with default 2000 iterations on 4 chains and I think each of the resulting 4000 will be a random sample of data that I can then use to fit to the model to estimate the ‘known’ parameter values.

so I choose 4000th iteration, but when I ran it a second time and still chose the 4000th iteration, the generated data are different to the previous one. I am wondering where did it go wrong?

hope for some clarification, thanks in advance