Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Drawing from a standard Cauchy

From   Maarten Buis <>
Subject   Re: st: Drawing from a standard Cauchy
Date   Tue, 10 Jan 2012 09:27:56 +0100

On Tue, Jan 10, 2012 at 3:35 AM, Dorothy Bridges wrote:
> Would I be correct in using the code "gen epsilon=invttail(1,
> uniform())" to simulate sampling from a standard Cauchy?

That is correct but old code. As of Stata 10.1 you can better write
-gen epsilon = rt(1)-, see -help random number functions-.

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index