Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on Seed command in database within the Database General forums, part of the Databases category; What is the use of seed command in random number generation? I am confused about how to use this command. Waiting for some help!!!!...
|
|||||||
|
|||
|
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.
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Relationship in Database | RyanJames | Database General | 1 | 01-12-2008 12:51 PM |
| Backup of Database | norman | Oracle | 3 | 10-13-2006 05:58 PM |
| Database access using C program | fred | C and C++ | 1 | 07-13-2006 09:52 PM |
| Applying DDL scripts to a remote database | Lokesh M | Web Servers | 0 | 06-23-2006 11:14 PM |
| Deploying to the database in WebSphere | Lokesh M | Web Servers | 0 | 06-23-2006 11:12 PM |