Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Steve Nakoneshny <scnakone@ucalgary.ca> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
Re: st: proportional random sampling |

Date |
Tue, 25 Oct 2011 11:05:41 -0600 |

Hi Cam, We're investigating in a retrospective study whether or not a particular pathologic feature of a tumour can be accurately predicted using an imaging modality (CT scan) prior to surgery. We've identified 44 eligible patients for which the distribution of this feature is approximately 2:1. Prior to undertaking the majority of the work, it was suggested that we take a random sample of each group (positive and negative) and ask the radiologists to asses their scans blindly in order to validate the data collection instrument as a pilot test. The plan was to go with 5 from each arm, but it was later suggested that we provide them with an unequal distribution so that the radiologists don't automatically assume a 50/50 split. I could easily go with a fully randomized selection, but I want to ensure that we have a representative proportion for each, hence wanting to retain the 2:1 ratio. I have already narrowed down the dataset to a random sample I'm comfortable with via the code I employed previously. I was simply asking of the list if anyone could suggest an alternate means of arriving at a similar result in perhaps a more elegant fashion as a purely intellectual exercise. If not, that's fine too. Thanks, Steve On 2011-10-24, at 8:51 PM, Cameron McIntosh wrote: > Steve, > I think that if you described the motivation for this exercise, it might help elicit advice -- perhaps some that even suggests an alternative way of looking at your problem, whatever that may be. :) > Thanks, > Cam > > ---------------------------------------- >> From: scnakone@ucalgary.ca >> To: statalist@hsphsun2.harvard.edu >> Date: Mon, 24 Oct 2011 17:15:20 -0600 >> Subject: st: proportional random sampling >> >> Dear Statalisters, >> >> I have a small dataset (n=44) from which I want to draw a random sample of records. The distribution of these records across my variable of interest in approximately 2:1. What I wish to do is to create a random sample of records of size n that retains the proportional distribution across my variable of interest. >> >> Assuming a random sample where n=12, I wrote the following code: >> >> sort ecs >> by ecs: sample 8,count >> sample 50 if ecs==1 >> >> ------ >> Although how I coded it certainly works, what I am wondering if there is a more elegant means of coding to achieve a similar result? >> >> >> Thanks, >> Steve >> * >> * 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/ > > * > * 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/ * * 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/

**Follow-Ups**:**Re: st: proportional random sampling***From:*Stas Kolenikov <skolenik@gmail.com>

**References**:**st: proportional random sampling***From:*Steve Nakoneshny <scnakone@ucalgary.ca>

**RE: st: proportional random sampling***From:*Cameron McIntosh <cnm100@hotmail.com>

- Prev by Date:
**Re: st: Stata 12 64bit odbc** - Next by Date:
**Re: st: oglm and heterogeneous choice models** - Previous by thread:
**RE: st: proportional random sampling** - Next by thread:
**Re: st: proportional random sampling** - Index(es):