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 on April 23, and its replacement, statalist.org is already up and running.


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

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


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: generate lognormal RV less than 20000 observations.
Date   Fri, 9 Apr 2010 10:20:00 +0100

This sparked a thread with Martin Weiss. I have four comments by way of summarizing and going beyond that exchange. 

1. Please do specify where user-written software you refer to comes from. 
(Most postings from Sun Samn ignore advice in the FAQ in at least one way.) 

2. It is quite untrue that -rndlgn- requires 20,000 observations.

3. In this case, the user-specified software is not, and never has been, needed. A one-line call with reference to -exp(rnormal())- gets you random draws from a lognormal quite directly. (Before -rnormal()- was introduced, other functions could be used, and indeed were used internally within -rndlgn-. I imagine that for their own reasons Joe Hilbe and friend wanted something uniform in syntax with the other commands that they wrote a while back.)  

4. -rndlgn- is a command, not a function. -exp()- and -rnormal()- are functions. 

Nick 
n.j.cox@durham.ac.uk 

sun samn

   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?

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