Statalist The Stata Listserver

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

Re: st: random numbers generator

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

"Cassio M. Turra" <> 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 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
*   For searches and help try:

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