Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

AW: AW: st: AW: generate lognormal RV less than 20000 observations.


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: AW: st: AW: generate lognormal RV less than 20000 observations.
Date   Fri, 9 Apr 2010 10:44:22 +0200

<> 

Hmmm, as I said, you can pass the # of observations directly to the command,
as demonstrated earlier, so the -keep- line is not really necessary. What is
-return- supposed to do? I bet it leads to an error message...



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von sun samn
Gesendet: Freitag, 9. April 2010 10:32
An: statalist@hsphsun2.harvard.edu
Betreff: RE: AW: st: AW: generate lognormal RV less than 20000 observations.





Hi, Martin,
   I am sorry that I am really a novice for stata. Basically I have the
following code:

rndlgn 20000 0 0.5
keep in 1/500
return x1

Is it correct?
thanks

samn 







----------------------------------------
> From: martin.weiss1@gmx.de
> To: statalist@hsphsun2.harvard.edu
> Subject: AW: st: AW: generate lognormal RV less than 20000 observations.
> Date: Fri, 9 Apr 2010 10:20:08 +0200
>
>
> <>
>
> BTW, you should take a look at the example at the bottom of -help
simulate-
> which will do what you want in a less "opaque" fashion. The command you
are
> currently using seems a bit outdated...
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von sun samn
> Gesendet: Freitag, 9. April 2010 10:09
> An: statalist@hsphsun2.harvard.edu
> Betreff: RE: st: AW: generate lognormal RV less than 20000 observations.
>
>
> Hi, Martin,
>    Thanks for your help! could you tell me how return that 500
observations
> to a variable like we do for normal distribution:
> set obs 500
> gen x1=rnormal()
>
>
> Thanks a gain!
> samn
>
>
>
>
>
>
> ----------------------------------------
>> From: martin.weiss1@gmx.de
>> To: statalist@hsphsun2.harvard.edu
>> Subject: st: AW: generate lognormal RV less than 20000 observations.
>> Date: Fri, 9 Apr 2010 09:50:36 +0200
>>
>>
>> <>
>>
>> So this function is part of a series of random number generators
published
>> by J. Hilbe and W. Linde-Zwirble, and accessible via -findit rndlgn-.
What
>> makes you think you need 20,000 obs? Just say:
>>
>> *************
>> rndlgn 500 0 0.5
>> *************
>>
>> Even if it did require 20,000 initially, you could still -keep in
> 1/500-...
>>
>> HTH
>> Martin
>>
>> -----Ursprüngliche Nachricht-----
>> Von: owner-statalist@hsphsun2.harvard.edu
>> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von sun samn
>> Gesendet: Freitag, 9. April 2010 09:45
>> An: statalist@hsphsun2.harvard.edu
>> Betreff: st: generate lognormal RV less than 20000 observations.
>>
>>
>> Hi, folks,
>> I know the function ' rndlgn' can generate lognormal RVs, but it
> requires
>> the numbers of observation to be at 20000. Now, I want a list of only
500.
>> What should I do then?
>> thanks,
>> 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/
>>
>>
>> *
>> * 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: Trusted email with Microsoft?s powerful SPAM protection.
> 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/
>
>
> *
> * 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: Trusted email with powerful SPAM protection.
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/


*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index