Hi,
try putting
- Code: Select all
s = RandStream('mt19937ar','seed',1);
RandStream.setDefaultStream(s);
before the estimation command. This should set the seed to 1.
I am no expert on this issue, but I do not really see a need to fix the seed. The mode_compute=6 algorithm works like the Metropolis-Hastings algorithm used in Bayesian estimation. Everytime you run the Random Walk Metropolis-Hastings algorithm with not exactly the same seed you will get different results for your posterior as the draws from the prior distribution will differ. However, irregardless of the starting values and the seed of the random number generator, the estimation should converge to the true posterior with the correct mode. Hence, mode_compute=6 should give you approximately the same results every time you run it. If it does not, the estimation may not have converged to the mode yet.