Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Randomly assigning certain percentage of observations within groups


From   "Sabbatini, Amber" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Randomly assigning certain percentage of observations within groups
Date   Wed, 1 Jan 2014 12:49:45 +0000

Hi Statalisters!  I have national hospital data of over 22 million visits
to the emergency room within 961 hospitals.  I want to create 3 new
indicator variables for low, moderate and high acuity visits and randomly
assign a percentage of patients with specific diagnoses within each
hospital to these acuity groups.

For example, for patients with a urinary tract infection, I wish to assign
66% of the patients within each hospital to the low group, 17% of the
patients within each hospital to the moderate group, and
 17% of the patients within each hospital to the high group.  I also want
Stata to pick which patients it assigns within each hospital randomly to
reduce bias and evenly distribute patients on their other characteristics
(age, gender, etc).

Any ideas how this might be accomplished?

Thanks,

Amber Sabbatini, MD MPH
Clinical Lecturer 
University of Michigan

**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues 


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index