This should be an easy question:
I have generated an empiric frequency distribution, using -contract-, such
that I have two variables-- the variable of interest (hour of the day that a
patient is discharged from the hospital), and the cumulative frequency of
from a set of empiric observations.
How can I generate a function which picks random hours in a frequency
proportional to this distribution?
Thanks.
*
* 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/