[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: statalist-digest V4 #1555
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,
* For searches and help try: