[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: Re: st: randomly selecting subjects from clusters
Thanks for the very helpful extra clarification.
You are correct: the problems do differ slightly.
The FAQ almost answers the question, but not quite: to get
one random individual per household (as opposed to a random
sample of households), try:
set seed 12345678
bys household (random): gen byte mysample=_n==1
Then -mysample- will be one randomly selected individual
n j cox
> The Statalist FAQ advises, inter alia, consideration of
> the existing FAQs. In this case,
> How can I sample clusters, not individuals?
> I have a data set where each record is an individual in a household.
> all members of each household. How do I make a dataset that has only one
> randomly selected member from each household?
* For searches and help try: