Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: random pick from a custom distribution


From   "daniel waxman" <[email protected]>
To   <[email protected]>
Subject   st: random pick from a custom distribution
Date   Thu, 16 Feb 2006 21:36:53 -0500

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index