Statalist The Stata Listserver


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

Re: st: random numbers generator


From   Brendan Halpin <[email protected]>
To   [email protected]
Subject   Re: st: random numbers generator
Date   Sun, 06 May 2007 22:18:19 +0100

"Cassio M. Turra" <[email protected]> writes:

> Hi, I need to generate random numbers from a discrete probability
> distribution (drawn from a life table).
> Does anyone know how I can do it in Stata?
> I don't want to use any continuous probability functions built in Stata.

The function uniform() will give you random numbers in the range
[0,1) -- it's up to you to define how this should map into your
discrete distribution.

Brendan

-- 
Brendan Halpin,  Department of Sociology,  University of Limerick,  Ireland
Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147
mailto:[email protected]  http://www.ul.ie/sociology/brendan.halpin.html
*
*   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