Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: random sample by hhid


From   "Ms. Marilyn Ibarra" <[email protected]>
To   [email protected]
Subject   st: random sample by hhid
Date   Fri, 24 Feb 2006 11:17:29 -0500

Anyone know how to draw a random sample by hhid?  I want to 
draw a random sample at the household level, such that it 
keeps everyone in the household.  I would like a one percent 
sample of households.  So if I have 100 households but 500 
individuals, I would like for it to keep 1 household (that 
is all the members that belong to that 1 household).
 
My data looks like this. 
 
Person       hhid      age
Luis           1          30
Nancy          1          35
Joe            1          32
Bren           2          15
Jane           2           9
Linda          3          11
Tom            3          65 
 
Thanks,
Marilyn. 
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index