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

RE: st: rndlgn 500 1 -1

 From sun samn To Subject RE: st: rndlgn 500 1 -1 Date Sat, 10 Apr 2010 15:49:53 +0800

```

Perfect explanation! thank you very much!

----------------------------------------
> Date: Sat, 10 Apr 2010 12:22:52 +0530
> Subject: Re: st: rndlgn 500 1 -1
> From: tirthankar.chakravarty@gmail.com
> To: statalist@hsphsun2.harvard.edu
>
> Here is the -trace- from your command:
> ******************************************************
> - version 3.1
> - cap drop xlgn
> - qui {
> - local cases `1'
> = local cases 500
> - set obs `cases'
> = set obs 500
> - mac shift
> - local mn `1'
> = local mn 1
> - mac shift
> - local var `1'
> = local var -1
> - mac shift
> - tempvar ran1
> - noi di in gr "( Generating " _c
> ( Generating - gen `ran1' = exp(`mn'+`var' * invnorm(uniform()))
> = gen __000000 = exp(1+-1 * invnorm(uniform()))
> - gen xlgn = `ran1'
> = gen xlgn = __000000
> - noi di in gr "." _c
> .- noi di in gr " )"
> )
> - noi di in bl "Variable " in ye "xlgn " in bl "created."
> Variable xlgn created.
> - }
> ******************************************************
>
> As you can see in the line
>
> = gen __000000 = exp(1+-1 * invnorm(uniform()))
>
> the "variance" input is used as standard deviation instead.
>
> By the way, -rnd- (STB) is due to Joseph Hilbe and Walter Linde-Zwirble.
>
> T
>
> 2010/4/10 sun samn :
>>
>> Hi, there,
>>
>>    I cannot believe that 'rndlgn 500 1 -1' this works in stata!
>>    you know, the variance of '-1' should not make any sense! Does someone know what it is really going on there?
>>
>> thanks a lot!
>>
>> samn
>>
>>
>>
>>
>> _________________________________________________________________
>> Hotmail: Powerful Free email with security by Microsoft.
>> https://signup.live.com/signup.aspx?id=60969
>> *
>> *   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/
>>
>
>
>
> --
> To every ω-consistent recursive class κ of formulae there correspond
> recursive class signs r, such that neither v Gen r nor Neg(v Gen r)
> belongs to Flg(κ) (where v is the free variable of r).
>
> *
> * 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/

_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
https://signup.live.com/signup.aspx?id=60969
*
*   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/
```