Investigated bug https://github.com/stan-dev/stan/issues/2241, which reports that in rstan, RNG functions called from the transformed data block are always using the same seed value of
0, even when the random seed is overtly specified. cmdstan has the same problem.
This is due to the fact that the stan model object has both a 2-arg and 3-arg constructor. The 3-arg constructor takes an instantiated boost rng object; the 2-arg constructor instantiates such an object with seed
I put a fix in for cmdstan - we need something similar for rstan and we should check all other interfaces - pystan, etc.