I have a fairly complex do-file that estimates multiple binary choice models using maximum likelihood (especially probit, using the probit command). In a small number of those models, I see minor differences in estimation output depending on whether I run this code immediately after launching Stata or after running some other code. Only as a result of this did I learn that maximum likelihood estimation in Stata is not always exactly reproducible when the same code is run repeatedly.
I want my code to deliver the same output as it does immediately after launching Stata, regardless of when it is run. Is there a special "MLE seed" that would accomplish this?
For example, when typing
set seed 123456789
I can replicate the pseudo-random numbers Stata generates immediately after launching, even though my current session has lasted much longer.
Similarly, when I type
set sortrngstate 1001XZA112210f4b16c1cb10507a1f38cb440c40003c9a8356 6fa1201b69ab0aff2f2401e18
I can replicate the sort order obtained immediately after launching Stata.
Is there a similar "seed" that ensures maximum likelihood estimation runs as if Stata had just been launched?
I want my code to deliver the same output as it does immediately after launching Stata, regardless of when it is run. Is there a special "MLE seed" that would accomplish this?
For example, when typing
set seed 123456789
I can replicate the pseudo-random numbers Stata generates immediately after launching, even though my current session has lasted much longer.
Similarly, when I type
set sortrngstate 1001XZA112210f4b16c1cb10507a1f38cb440c40003c9a8356 6fa1201b69ab0aff2f2401e18
I can replicate the sort order obtained immediately after launching Stata.
Is there a similar "seed" that ensures maximum likelihood estimation runs as if Stata had just been launched?

Comment