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: Creating choice indicator!
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: Creating choice indicator!
Date
Tue, 20 Mar 2012 19:48:56 +0000
You're right. That's a bit of a flaw if you use -ceil()-.
Nick
On Tue, Mar 20, 2012 at 6:56 PM, Austin Nichols <[email protected]> wrote:
> Nick Cox <[email protected]>:
> The only problem with ceil instead of floor is that uniform() is zero
> about 1 time in 2^32 iterations.
>
> On Tue, Mar 20, 2012 at 2:24 PM, Nick Cox <[email protected]> wrote:
>> Alternatively, look upwards!
>>
>> ceil(5 * runiform())
>>
>> Nick
>> [email protected]
*
* 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/