Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Joerg Luedicke <joerg.luedicke@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Randomly picking observations based on a certain condition |
Date | Wed, 13 Apr 2011 16:06:22 -0400 |
On Wed, Apr 13, 2011 at 3:17 PM, Nikhil Srivastava <nikhil.del85@gmail.com> wrote: > Hi, > > I have a dataset at the household level which contains the expenditure > details of a sample of households. The dataset also records the number > of adults within each household. I have divided this dataset into 5 > quintiles based on the level of expenditure. Now I need to randomly > select a set of observations within each quintile so that the sum of > the adults for those observations comes to 100. Could somebody please > help me in writing a code for this part? > > I would really appreciate any help in this regard. Thanks Do I understand that right, you want to sample households, and within each quintile of household expenditure, the number of household members among sampled households is supposed to add up to 100? Why would you do that? Why not just taking a random sample of households or a stratified sample with respect to household size, if that is a concern. That way, you would at least have a clear picture of the population you are targeting, whereas in the other case, this picture becomes pretty blurry, no? J. * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/