Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: RE: Random numbers
From
Evans Jadotte <[email protected]>
To
[email protected]
Subject
Re: st: RE: Random numbers
Date
Wed, 12 May 2010 19:35:47 +0200
Martin Weiss wrote:
<>
See -h runiform()-:
***********
clear*
set obs 10000
//To generate random integers over [a,b]
local a 100
local b 1000
gen myrandomnumber=`a'+int((`b'-`a'+1)*runiform())
***********
HTH
Martin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Evans Jadotte
Sent: Mittwoch, 12. Mai 2010 18:53
To: [email protected]
Subject: st: Random numbers
Hello statlisters,
I would like to generate a distribution of 1000 observations randomly
distributed between 100 and 1000. Any help with the command is much
appreciated.
Thanks,
Evans
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
Many thanks Martin!
Evans
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/