Hi,
I would like to create a random sample of observations from a large data
file (lets say 1 or 5%), selecting cases based on an id number. For many
cases I have more than one row (record) per id number, so I cannot apply the
sample command directly.
Is there an easy way to randomly select all the cases, together with their
corresponding records, without having to reshape the data? The number of
records for each case could range from 1 to 15.
Thanks in advance for any help,
Carlos
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/