Hi Statalist,
I found that every time when I open Stata, the random seed resumes to a status. For example, every time when I open Stata and draw 10 values from the uniform distribution, Stata always gives me the same results. However, R and MS-Excel do not behave like this -- they will give me different values when I re-open them and draw the values. Therefore I would like to ask whether Stata is designed to behave like that, or whether there is something wrong in my system.
Moreover, I found that I cannot change the random number generator from mt64 to kiss32 or the other around by using the do file. I can only change the rng by running the syntax from the command windows. Again, I would like to know whether that is by design or whether that means something wrong in my system.
Thank you very much.
Best regards,
Kirin
I found that every time when I open Stata, the random seed resumes to a status. For example, every time when I open Stata and draw 10 values from the uniform distribution, Stata always gives me the same results. However, R and MS-Excel do not behave like this -- they will give me different values when I re-open them and draw the values. Therefore I would like to ask whether Stata is designed to behave like that, or whether there is something wrong in my system.
Code:
forvalue i=1/10 { di runiform() } .3488717 .26688571 .13664629 .02855687 .86893327 .3508549 .07110509 .32336795 .55510316 .87599101
Thank you very much.
Best regards,
Kirin
Comment