sophiayama
以下是用proc plan 生成random code 的其中一段程序:
proc plan seed=6457149;
factors block=30 random treat=12
random;
output out=first
treat nvals=(1 1 1 1 2 2 2 2 3 3 3 3)
random;
run;
在log中会有这样的提示NOTE: At the start of processing, random number seed=6457149.
NOTE: At the end of processing, random number seed=780343081.
说明seed是变化的。
问题一:这里seed是根据什么算法变化的呢?
问题二:在start时用相同的seed,应该可以reproduce出相同的random code 结果吧
Thanks in advance!
rtist
1. check SAS manual for the reference on the algorithms. Usually, the previous 1 or several random numbers will serve as the seed(s) for the next 1 or several random numbers.
2. yes.
sophiayama
Thanks for reply. I didn't get the reference from the SAS manual. 不过你的回答大概已经让我有个了解。
rtist
[quote]引用第2楼sophiayama于2007-09-23 09:02发表的“”:
Thanks for reply. I didn't get the reference from the SAS manual[/quote]看置顶帖。