Thursday, February 16, 2006
st: random pick from a custom distribution
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?
* * 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/
Links to this post: