-
Contributing Member
Seed command in database
What is the use of seed command in random number generation? I am confused about how to use this command. Waiting for some help!!!!
-
Expert Member
Re: Seed command in database
Hi,
Seed command is used to set the seed for the random number generator.
-
Junior Member
Re: Seed command in database
When taking a random sample of your data, you may want to do so in a way that is reproducible. In other words, you can generate the same sample if you need to. To do this, you will need to set the seed. The seed is the number with which stata (or any other program) starts its algorithm to generate the pseudo-random numbers. If you do not set the seed, stata will start its algorithm with the seed 123456789. To set the seed, use the set seed command followed by a number. The number can be very large, including 30 or more digits. Remember to this in a .do file or to write the seed number down somewhere. Set seed 2038947 ******************* seed syntax seed {value | time | 0} ; remarks the seed command supplies the seed value for random number generation. Time or 0 indicate that the current time will be used for the seed. If this command is not present, the time at program initiation will be used.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules